我想做这样的事情:
insert into TableA
(val1,val2)
values
("value",(select top 1 tableB.X from tableB where tableB.Y=@Y))
我收到此错误:
如何停止该错误?
最佳答案
假设您使用的是 SQL Server:
insert into tableA
(val1, val2)
select top 1 'value', tableB.x from tableB where tableB.Y = @y
关于c# - 插入查询中的内连接?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/2343193/