Link to home
Start Free TrialLog in
Avatar of vinodand
vinodand

asked on

append data into t-sql cursor

i wanted select * from table1 where id=1 to retrieve the data two times - ie the single row should get duplicated and appended below the result returned from above query.
eg. select a,b,c from table1where id-1 should return data like below
a                        b                   c
xys                    abc               def
xys                    abc               def
can someone help?
thanks in advance
Avatar of amx
amx
Flag of United Kingdom of Great Britain and Northern Ireland image

Try this:
select * from table1 where id=1
union all
select * from table1 where id=1

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of tigin44
tigin44
Flag of Türkiye image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Scott Pletcher
Scott Pletcher
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial