sql alias code example
Example 1: sql update alias
UPDATE t
SET t.COLUMN = 'UPDATE'
FROM DATABASE_TABLE t
WHERE t.ID = 1;
Example 2: sql alias
-- SELECT my_col_name AS my_alias FROM my_table;
SELECT sysdate() AS "Current date"; -- MySQl Alias
SELECT sysdate AS "Current date" FROM dual; -- same in Oracle
Example 3: alias in sql
ALIAS command in SQL is the name that
can be given to any table or a column.
This alias name can be referred in WHERE
clause to identify a particular table or a column.