sq2

The SQL syntax is quite an easy one to grasp. Most of the actions you need to perform are done with a SQL statement.
Generally, a SQL statement begins by stating what to do (for example, SELECT), then states which object to do it to (for example, using the FROM clause).
SELECT * FROM Individual;
It may also have a condition added to the end (for example, with a WHERE clause).
SELECT * FROM Individual
WHERE FirstName = 'Homer';
SQL is not case sensitive — the above examples could just have easily used all lowercase or all uppercase. Different programmers have their own preferences. For readability purposes, many SQL programmers prefer to use uppercase for SQL commands and lowercase for everything else.
The SQL syntax allows you to include line breaks at logical points without it breaking the statement. For example, the above example could have been written all on one line — or across 4 lines.
Also, a semicolon should be placed at the end of each SQL statement. There are some exceptions where a semicolon may be omitted, however, it's good practice to include them unless you have good reason not to.

No comments: