In SQL, an alias is a temporary name given to a table or column for the duration of a query. It's like giving a nickname to make your queries more readable or to simplify complex table names.
We use the AS keyword to create aliases. Here's the basic syntax:
Loading editor...
Let's try a simple example with our Codémon database:
↗️
Loading editor...
↶
↷
Notice how the column header in the result is now "codemon_name" instead of "name".