MAKE FULL WEB APPLICATION WITH JUST SQL KNOWLEDGE? CLICK HERE
SQL Alias is an element used to replace a namespace in the
style sheet to a different namespace in the output. It is a top-level
element, and must be a child node. It can also be known as Pet
name or another name for a same thing or object. SQL,
aliases can be used for column names and table names.
The syntax is :-
SELECT column AS column alias FROM table |
Example:- Using a Column Alias
This table (Persons): -
LAST NAME |
FIRST NAME |
ADDRESS |
CITY |
Shah |
Purvi |
Pancham |
Mumbai |
Sheth |
Prachi |
Nariman |
Banglore |
Parekh |
Dulari |
Shivdham |
Kerala |
The SQL: -
SELECT Last Name AS Family, First Name
AS NameFROM Persons |
Result: -
FAMILY |
NAME |
Shah |
Purvi |
Sheth |
Prachi |
Parekh |
Dulari |
If you don't find what you are looking for. Please click
here to submit your query, our experts will reply soon.
|