Declare a table variable
DECLARE @t table
(
id INT Identity,
column1 VARCHAR(200)
)
insert value to the table
insert into
@t(a)
select 'aa'
union
select 'bb'
union
select 'cc'
union
select 'dd'
Run select query
select * from @t
1 aa
2 bb
3 cc
4 dd
No comments:
Post a Comment