1.

What is an Alias in SQL?

Answer»

An alias is a feature of SQL that is supported by most, if not all, RDBMSs. It is a temporary name assigned to the table or table column for the purpose of a PARTICULAR SQL query. In addition, aliasing can be EMPLOYED as an obfuscation technique to secure the real names of database fields. A table alias is also called a correlation name.

An alias is represented explicitly by the AS keyword but in some cases, the same can be performed without it as well. Nevertheless, using the AS keyword is ALWAYS a good practice.

SELECT A.emp_name AS "Employee" /* Alias using AS keyword */B.emp_name AS "Supervisor"FROM employee A, employee B /* Alias without AS keyword */WHERE A.emp_sup = B.emp_id; Write an SQL STATEMENT to select all from table "Limited" with alias "Ltd". Check


Discussion

No Comment Found