SQL commands syntax
MySQL uses a standard form of the well-known SQL data language. The great thing about SQL is that the code is very easy to read, as opposed to harder programming languages, such as C or C++. SQL statements are made up of plain English terms. These terms are called keywords, and every SQL statement is made up of one or more keywords. The SQL statement that you’ll probably use most frequently is the SELECT statement, for example:
SELECT * FROM customers;
All SQL commands and keywords are case-insensitive. However, most people write SQL commands (such as SELECT, FROM, LIMIT, etc.) in uppercase.
To separate or to end SQL commands, the semicolon is used. This allows you to issue more than one command at a time by placing a semicolon after each command:
mysql> USE employees; SELECT * FROM employees LIMIT 10;
Database changed
+--------+------------+------------+-----------+--------+------------+
| emp_no | birth_date | first_name | last_name | gender | hire_date |
+--------+------------+------------+-----------+--------+------------+
| 10001 | 1953-09-02 | Georgi | Facello | M | 1986-06-26 |
| 10002 | 1964-06-02 | Bezalel | Simmel | F | 1985-11-21 |
| 10003 | 1959-12-03 | Parto | Bamford | M | 1986-08-28 |
| 10004 | 1954-05-01 | Chirstian | Koblick | M | 1986-12-01 |
| 10005 | 1955-01-21 | Kyoichi | Maliniak | M | 1989-09-12 |
| 10006 | 1953-04-20 | Anneke | Preusig | F | 1989-06-02 |
| 10007 | 1957-05-23 | Tzvetan | Zielinski | F | 1989-02-10 |
| 10008 | 1958-02-19 | Saniya | Kalloufi | M | 1994-09-15 |
| 10009 | 1952-04-19 | Sumant | Peac | F | 1985-02-18 |
| 10010 | 1963-06-01 | Duangkaew | Piveteau | F | 1989-08-24 |
+--------+------------+------------+-----------+--------+------------+
10 rows in set (0.00 sec)
Table names are case-insensitive on Windows, but case-sensitive on Linux and OS X. It is recommended to use lowercase characters for tables.