create proc test as insert into b select * from a go
一楼正解 select .. into也可以但是不适于重复插入
CREATE PROCEDURE proc_checkuserinfo AS if not exists(select * from qqinfo where (convert(varchar(10), getdate(), 8) < convert(varchar(10), dStartDate, 8)) and iQQ in (select iQQId from qqstatus where iflag = 0 and iStatus <> 1) and iQQ not in(select iQQ from qqaction)) begin .....(需要把上面select的结果,放入另外一个表中,能解释下吗) end GO
insert into b
select * from a
go
select .. into也可以但是不适于重复插入
AS
if not exists(select * from qqinfo where (convert(varchar(10), getdate(), 8) < convert(varchar(10), dStartDate, 8)) and iQQ in (select iQQId from qqstatus where iflag = 0 and iStatus <> 1) and iQQ not in(select iQQ from qqaction))
begin
.....(需要把上面select的结果,放入另外一个表中,能解释下吗)
end
GO