Saturday, 16 December 2017

Temporary Table in SQL Server store procedure

declare @mytbl as table
(
     id bigint,
     name varchar(30),
     mobileno varchar(30),

     email varchar(30)
)
insert @mytbl select userid,firstname,mobileno,emailid from student where class  in (4,20,84);

select * from @mytbl

No comments:

Post a Comment