R restart2 Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-04 #1 有两条select语句,我把它们的结果union之后,想添加到另外一个表中,但是提示insert语句错误, 那么应该如何添加呢?
我 我爱PASCAL Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-04 #2 insert into a from (select b union select c) select b union select c 等效于一条select 语句。 所以写成 select b union select c union select D...都行
insert into a from (select b union select c) select b union select c 等效于一条select 语句。 所以写成 select b union select c union select D...都行
S svw0506 Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-04 #3 insert into Table1 (field1,field2,field3) (select field1,field2,field3 from table2 union select field1,field2,field3 from table3) --各个表的field1,fields2,field3必须一一对应
insert into Table1 (field1,field2,field3) (select field1,field2,field3 from table2 union select field1,field2,field3 from table3) --各个表的field1,fields2,field3必须一一对应
Q QuickSilver Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-04 #5 inser into 表1 select * from (select * from 表2 union select * from 表3)
R restart2 Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-05 #8 我准备完蛋了,哈哈,大家不帮忙啊?哈哈,那等我完蛋的时候我来散分啊,你们不要挤, 排好队~```大家都有份啊,哈哈哈哈
H HeyTommy Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-05 #9 我的计算机有问题了,所以没来得急回复,,, 在INSERT 后面不带字段的话是要求以VALUES的形式进行记录的插入的, 当以SELECT进行插入时,,可以用下面的形式,, INSERT INTO A[字段名] SELECT B[字段名] FROM B UNION SELECT C[字段名] FROM C
我的计算机有问题了,所以没来得急回复,,, 在INSERT 后面不带字段的话是要求以VALUES的形式进行记录的插入的, 当以SELECT进行插入时,,可以用下面的形式,, INSERT INTO A[字段名] SELECT B[字段名] FROM B UNION SELECT C[字段名] FROM C
H HeyTommy Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-05 #11 restart2: 你的SQL是怎么写的嘛,,帖出来大伙才晓得是哪里出问题了塞!!!