SQL was designed to be entered on a console and results would display back to a screen.
Today, SQL is mostly used by programmers who use SQL inside their language to build applications that access data in a database.
The syntax of a language describes the language elements.
SQL statements are somewhat like simple English sentences.
Keywords include SELECT, UPDATE, WHERE, ORDER BY, etc.
ANSI Standard SQL is the lingua franca for relational databases.
Four fundamental operations that apply to any database are:
Read the data -- SELECT
Insert new data -- INSERT
Update existing data -- UPDATE
Remove data -- DELETE
Collectively these are referred to as CRUD (Create, Read, Update, Delete).
The SQL SELECT general form
ORDER BY sort-order
SELECT FirstName, LastName, City, Country
WHERE City = 'Paris'
ORDER BY LastName
The SQL INSERT general form
INSERT table-name (column-names)
INSERT Supplier (Name, ContactName, City, Country)
VALUES ('Oxford Trading', 'Ian Smith', 'Oxford', 'UK')
The SQL UPDATE general form
SET column-name = column-value
SET Quantity = 2
WHERE Id = 388
The SQL DELETE general form
WHERE Email = 'email@example.com'