SQL chapters

Chapter 3 of 17

Statements, identifiers and aliases

Try this in our SQLite Compiler →

The idea

SQL statements end with semicolons. Single quotes delimit string literals; identifiers name tables and columns. Keywords are normally case-insensitive, but comparisons of text follow the database's collation rules. An alias labels a result expression without renaming the underlying table column.

Worked example

SELECT 'Asha' AS student, 80 + 5 AS adjusted_score;

What to check

The result is Asha and 85. adjusted_score is an output label; it is not a persistent variable.

Practice task

Create two arithmetic expressions with different aliases. Keep string literals in single quotes.

Check your understanding

Explain the result in your own words before changing the example. Change one thing at a time, compare the result with your prediction, and keep the version that demonstrates the concept clearly.

Try it yourself

Output
Run your project to see output here.
Ctrl/Cmd+Enter runs · Ctrl/Cmd+S downloads the project · Local auto-save is always on