我想使用一个插入sql查询插入多行。我知道可以在一个sql查询中插入多行。使用子查询在sql中插入多行
我已经写了一些查询作为
insert into test values ((select loan_id from loan_transaction_mcg))
,但我收到的错误
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
反正是有插入数据像这个样子。我在test
表中有单列。
注意,[手册](http://msdn.microsoft.com/en-US/library/ms174335.aspx “INSERT(的Transact-SQL)”)提到相应的语法('INSERT。 ... SELECT')并且具有[示例](http://msdn.microsoft.com/zh-cn/library/ms174335.aspx#OtherTables“INSERT(Transact-SQL):Insert Other Data from Other Tables”)。 – 2012-07-30 12:05:50