SQL statement examples

From Wiki @ Karl Jones dot com
Revision as of 09:15, 23 July 2015 by Karl Jones (Talk | contribs) (First)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This article demonstrates a variety of SQL statements.

SQL statements, broadly speaking, fall into four commonly used categories:

  • SELECT statements
  • INSERT statements
  • UPDATE statements
  • DELETE statements

SQL statements are typically case-insensitive. These examples follow the common convention of uppercasing SQL keywords.

SELECT statements

SELECT statement return zero or more records.


INSERT statements

INSERT statements insert a new record into a database table

UPDATE statements

UPDATE statements update zero or more existing records in a database table

DELETE statements

DELETE statements delete zero or more existing records from a database table

Different implementations of SQL

Note that different implementations of SQL -- different "flavors" -- may differ in their details. The examples on this page are appropriate to a wide range -- but not necessarily all -- implementations.