LXLogicExcel
๐Ÿ”ฅ
0
โญ
0
AS (Aliases) & Column Arithmetic1 / 10
An alias 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.

Select product_name and unit_price, but rename them so they are more user-friendly. Try:

SELECT product_name AS item, unit_price AS cost FROM products;
idproduct_namecategoryunit_price
1T-ShirtClothing20
2JeansClothing55
3SneakersFootwear80
4HatAccessories25
5JacketClothing120

Ctrl+Enter to submit

๐Ÿ”ฅ 0 streak
โญ 0 XP this lesson
All Lessons

AS (Aliases) & Column Arithmetic - Free SQL Practice Online

Practise AS (Aliases) & Column Arithmetic with 10 free, interactive SQL exercises. You type real queries into your browser and get instant feedback on every answer - no database setup, no install, and no signup. It is a fast, hands-on way to learn SQL online and build query skills you can use at work.