SQL
SQL Syntax Basics
Learn the rules of the SQL language.
By TechCoder TeamLast updated: 2026-06-02
In a Nutshell
Learn the rules of the SQL language. This hands-on tutorial focuses on practical implementation of sql syntax basics concepts.
SQL Syntax Basics
SQL syntax is unique but easy to read (it reads like English).
Key Rules
- Case Insensitivity: SQL keywords (
SELECT,FROM,WHERE) are not case-sensitive.selectis the same asSELECT. However, it is a best practice to write keywords in UPPERCASE to distinguish them from table and column names. - Semicolons: Some database systems require a semicolon
;at the end of each SQL statement. It is the standard way to separate commands.
Comments
Comments are text that is ignored by the database engine.
- Single-line comment: Starts with
-- - Multi-line comment: Starts with
/*and ends with*/
-- This is a single-line comment
SELECT * FROM Users; -- Select all users
/*
This is a multi-line comment.
It can span multiple lines.
*/
SELECT name FROM Users;