读书人

[急救]高手们快进来尖叫.该怎么解决

发布时间: 2012-03-21 13:33:15 作者: rapoo

[急救]高手们快进来尖叫.
我想把一个表查询出来的记录插入到另外一个表里面进去.同一个数据库.
insert into test values(select top 8000 Content from PE_Article where ArticleID not in (select top 10731 ArticleID from PE_Article))

这样的话只能是插入一条记录,请问还有没有别的方法..

Content表 插入到 test表
查询出来的 Content字段
数据是8000

[解决办法]
select top 8000 Content into test from PE_Article
where ArticleID not in
(select top 10731 ArticleID from PE_Article)
[解决办法]
insert into test select top 8000 Content from PE_Article
where ArticleID not in
(select top 10731 ArticleID from PE_Article)

[解决办法]
--最好上字段
insert into test(Content)
select top 8000 Content into test from PE_Article
where ArticleID not in
(select top 10731 ArticleID from PE_Article)

读书人网 >SQL Server

热点推荐