--建立数据 sql2000
create table #tmp1(name varchar(20),age int,address varchar(30))
insert into #tmp1(name,age,address) values('Tom',15,'USA')
--查看表1数据
select * from #tmp1
--生产表2数据
create table #tmp2(name varchar(20),age int,address varchar(30),status bit,datetime datetime)
declare @st bit
declare @dt datetime
set @st=0
set @dt=getdate()
insert into #tmp2(name,age,address,status,datetime) select a.name,a.age,a.address,@st as status,@dt as datetime from #tmp1 as a where name='Tom'
--查看表2数据
select * from #tmp2