insert into newtb(name) select name from oodtb where year>='1999' and year<='2005'
select name, year into newtab from oldtab where year >= 1999 and year <= 2005
如果year是datetime类型: insert into newtab select name,[year] from oldtab where year([year]) between 1999 and 2005
select [name], [year] into newtab from oldtab where [year] between 1999 and 2005
insert into newtab (name,year) select name,[year] from oldtab where year >= 1999 and year <= 2005
楼楼上 select name, year into newtab from oldtab where year >= 1999 and year <= 2005 正解
select [name], [year] into newtab from oldtab where [year] between 1999 and 2005
insert into newtab select name,year from oldtab where year(year) between 1999 and 2005
--假如没有newtab,重新建立一个新表: select name,year into newtab from oldtab where convert(varchar(4),year,120) between 1999 and 2005--假如存在表结构newtab insert into newtab(name,year) select name,year from oldtab where convert(varchar(4),year,120) between 1999 and 2005
select name from oodtb where year>='1999' and year<='2005'
insert into newtab
select name,[year] from oldtab where year([year]) between 1999 and 2005
into newtab
from oldtab
where [year] between 1999 and 2005
select name,[year] from oldtab where year >= 1999 and year <= 2005
select name, year into newtab from oldtab where year >= 1999 and year <= 2005
正解
into newtab
from oldtab
where [year] between 1999 and 2005
select name,year from oldtab where year(year) between 1999 and 2005
--假如没有newtab,重新建立一个新表:
select name,year into newtab from oldtab
where convert(varchar(4),year,120) between 1999 and 2005--假如存在表结构newtab
insert into newtab(name,year) select name,year from oldtab
where convert(varchar(4),year,120) between 1999 and 2005