let's us assume that we have the following table of Employee.
Now we want to merge the Emp_Salary_2010 and Emp_Salary_2011 columns into a
single column as Salary.
select Emp_Name,Emp_Salary_2010 as Salary from Employee union select Emp_Name,Emp_Salary_2011 as Salary from Employee
Please click here to see more .NET and SQL Server interview questions
Visit Authors blog for more .NET and SQL Server interview questions
Post a Comment