insert into frombook([from],bookid,stocknum,seat,isupdated,discount) values (11,select bookid from books where not exists (select * from frombook where frombook.bookid=books.bookid and [from]=11),5,'0',0,80)消息 156,级别 15,状态 1,第 1 行
关键字 'select' 附近有语法错误。
消息 102,级别 15,状态 1,第 1 行
',' 附近有语法错误。
一看代码就知道 我想干什么操作
关键字 'select' 附近有语法错误。
消息 102,级别 15,状态 1,第 1 行
',' 附近有语法错误。
一看代码就知道 我想干什么操作
select 11,bookid,5,'0',0,80
from books
where not exists (select * from frombook where frombook.bookid=books.bookid and [from]=11)
select 11, bookid,5,'0',0,80 from books where not exists (select * from frombook where frombook.bookid=books.bookid and [from]=11)
select 11,bookid ,5,'0',0,80
from books
where not exists (select * from frombook where frombook.bookid=books.bookid and [from]=11)
(11,select bookid from books where not exists (select * from frombook where frombook.bookid=books.bookid and [from]=11),5,'0',0,80)
insert into frombook ([from],bookid,stocknum,seat,isupdated,discount)
select 11,bookid ,5,'0',0,80
from books
where not exists (select * from frombook where frombook.bookid=books.bookid and [from]=11)
(11,select bookid from books where not exists (select * from frombook where frombook.bookid=books.bookid and [from]=11),5,'0',0,80)
select 11,bookid,5,'0',0,80
from books
where not exists (select * from frombook where frombook.bookid=books.bookid and [from]=11)
select 11, bookid,5,'0',0,80 from books where not exists (select * from frombook where frombook.bookid=books.bookid and [from]=11)
但是 不加values 为什么可以啊,
解释一下