You are working as SQL Server developer, you need to extract the data from dbo.Customer table and provide in an Excel Sheet. Your table has difference columns such as FName, LName but you want the output to come with FirstName and LastName. How would you do that?
Create table dbo.Customer (Id int, FName VARCHAR(50), LName VARCHAR(50)) GO insert into dbo.Customer Values ( 1,'Raza','M'), (2,'Rita','John')
Select FName as FirstName, LName LastName From dbo.Customer
|How to use Alias in SQL Server to Rename Column for output - SQL Server / TSQL Tutorial|
Select FName as [First Name], LName as "Last Name" From dbo.Customer
|How to use Alias in SQL Server - SQL Server / TSQL Tutorial|