SQL Interview Questions/Two Columns into One Column: 7
7.CONVERTING TWO COLUMNS INTO A SINGLE COLUMN AND STORING IN A NEW TABLE
create table employee
(
id nvarchar(100),
id1 nvarchar(100))
insert into employee values('1','A'),('2','B'),('3','C')
select * from employee

select * into E1 from (select id from employee union select id1 from employee)a where 1=1
select * from E1
Comments
Post a Comment