当前位置: 代码迷 >> Sql Server >> 为什么这样的select赋值不行?解决办法
  详细解决方案

为什么这样的select赋值不行?解决办法

热度:101   发布时间:2016-04-27 16:32:19.0
为什么这样的select赋值不行?
insert   table   select_course
select   '00000002 ', '00005 ',null
go

想把   '00000002 ', '00005 ',null   这三个值赋给Table   Select_course中的sno,cno,score

出现这样的错误:

服务器:   消息   156,级别   15,状态   1,行   1
在关键字   'table '   附近有语法错误。

请问这样赋值行的吗?或者类似这样的赋值的有吗?感谢你的回复。

------解决方案--------------------
insert select_course
select......
------解决方案--------------------
insert into [table select_course]
select '00000002 ', '00005 ',null
go
------解决方案--------------------
insert table select_course(sno,cno,score
) values( '00000002 ', '00005 ',null)
------解决方案--------------------
insert 表名
select '00000002 ', '00005 ',null



insert into 表名
select '00000002 ', '00005 ',null
------解决方案--------------------
同意楼上
  相关解决方案