|
Main Menu
Resources
|
SQL Alias
There are two types of aliases that are used most frequently in SQL command: which is column alias and table alias. Why ALIAS? There is some reasons alias to be use when querying a SQL command.
Syntax for Column Name Alias is : SELECT [COLUMN NAME] AS COLUMN_ALIAS FROM [TABLE NAME] Syntax for Table Name Alias is : SELECT [COLUMN NAME] FROM [TABLE NAME] AS TABLE_ALIAS Example will using this table : Table GameScores
let's say we want to refer to a simple example that just change the table name as DepartmentGameScores SQL statement : SELECT * FROM GameScores AS DepartmentGameScores Result: Table DepartmentGameScores
let's say we want to refer to a simple example which is return sum of the scores in the table. this example is taken from SQL SUM SQL statement : SELECT SUM(Scores) AS Total_score Result:
|
|||||||||||||||||||||||||||||||||||||||||||||||

Printer friendly page