日期:2014-05-18  浏览次数:20399 次

[求助]基础语法问题
实现的功能:从表中查询出所需要的内容,然后建立一个虚表,删除实表,最后把虚表插入到新表中..
select   Content   into   #test   from   (select   top   4594   *   from   test   where   id   not   in   (select   top   1   id   from   test))

但是这条语句报错,不知道那里错了,,大家帮我改改看.

------解决方案--------------------
select Content into #test from (select top 4594 * from test where id not in (select top 1 id from test)) aa --加一个别名
------解决方案--------------------
select Content into #test from (select top 4594 * from test where id not in (select top 1 id from test)) a
------解决方案--------------------
select bmh into #test from (select top 4594 * from rktz where xh not in (select top 1 xh from rktz)) aa 加一表名,我试过测试成功!!!
------解决方案--------------------
select Content into #test from (select top 4594 * from test where id not in (select top 1 id from test)) aa --后面要随便加个别名!