InterviewSolution
| 1. |
What are MySQL aliases |
|
Answer» MySQL supports two kinds of aliases which are known as column ALIAS and table alias. SOMETIMES the names of columns are so technical that make the query’s OUTPUT very DIFFICULT to understand. To give a column a descriptive name, you use a column alias. SELECT [column_1 | expression] AS descriptive_name FROM table_name;To give a column an alias, you use the AS keyword followed by the alias. If the alias contains space, you must quote it.You can use an alias to give a table a different name. You assign a table an alias by using the AS keyword as the following syntax table_name AS table_aliasThe alias for the table is called table alias. Like the column alias, the AS keyword is optional so you can omit it. |
|