I want to insert value from my sub query
我想从子查询中插入值
my query is like that..
我的查询是这样的......
insert into T_Scanned(F_Asset_Code) values (select F_Barcode from T_Assets where F_Barcode
in( select Barcode as barcoade from [T_NEWASSET]))
but this is not working...
但这不起作用......
1 个解决方案
#1
4
You don't need to use VALUES
when doing an INSERT INTO ... SELECT
:
在执行INSERT INTO时,您不需要使用VALU ... SELECT:
insert into T_Scanned(F_Asset_Code)
select F_Barcode from T_Assets where F_Barcode
in( select Barcode as barcoade from [T_NEWASSET])
#1
4
You don't need to use VALUES
when doing an INSERT INTO ... SELECT
:
在执行INSERT INTO时,您不需要使用VALU ... SELECT:
insert into T_Scanned(F_Asset_Code)
select F_Barcode from T_Assets where F_Barcode
in( select Barcode as barcoade from [T_NEWASSET])