An <i>alias</i> is when you use AS to change the name of a column in the results. Note that you are not changing the actual table in the database, just the way it appears to you in the results.<br><br>Select product_name and unit_price, but rename them so they are more user-friendly. Try:
Table products
| id | product_name | category | unit_price |
|---|---|---|---|
| 1 | T-Shirt | Clothing | 20 |
| 2 | Jeans | Clothing | 55 |
| 3 | Sneakers | Footwear | 80 |
| 4 | Hat | Accessories | 25 |
| 5 | Jacket | Clothing | 120 |
AS (Aliases) & Column Arithmetic - SQL Practice Online
Practise AS (Aliases) & Column Arithmetic with 10 interactive SQL exercises. You type real queries into your browser and get instant feedback on every answer - no database setup and no install. It is a fast, hands-on way to learn SQL online and build query skills you can use at work.