我正在尝试将一个表插入另一个表,
insert into list2([PHONE])
select [column 0] + [column 1] as PHONE
from [list1]
where not exists (select * from list2
where list2.phone = [list1].phone)
但我收到一个错误:
Msg 207, Level 16, State 3, Line 1
Invalid column name 'phone'.
在 上list2,有 2 列,phone并且area code。phone有完整的电话号码和area code区号。
在 上list1,还有 2 列,column 0分别是区号和column 1电话号码的前 6 位。
我究竟做错了什么?