You'll find SQL simple to learn and use if you know the proper syntax for passing data. For the most part, SQL consists of keywords individual words with a predefined meaning. Most keywords can include arguments, just like functions and procedures. A keyword with arguments is known as a clause.
Combined clauses that make a request of the database engine are called statements. A statement can consist of just one clause, but usually, there is more than one.
The most basic and general statement form is the following:
action fieldlist FROM datasource
where action is one of many keywords that defines the statement's purpose, fieldlist defines the fields to act upon, and datasource identifies the table in which the data is stored.
You can limit the records acted upon by adding a WHERE clause in the form
action fieldlist FROM datasource [WHERE condition]
Table A.1 lists the most common action SQL keywords. Table A.2 lists several SQL keywords that act as predicates that supply more information to the statement.
Table A.1. Common SQL action Keywords
SELECT fieldlist FROM datasource
UPDATE datasource SET col = expression
DELETE FROM datasource
Insert (or append) records into any existing table
INSERT INTO target SELECT datasource
Copy an existing table's structure and data to a new table
SELECT fieldlist INTO newtable FROM datasource
Table A.2. Additional Information Keywords and Predicates
Predicate that retrieves or acts upon all the rows in the data source
SELECT ALL FROM datasource
Predicate that returns unique values in specified fields
SELECT DISTINCT fieldlist FROM datasource
Predicate that returns unique records
SELECT DISTINCTROW fieldlist FROM datasource
Identifies the data source
Limits the number of records retrieved or acted upon
Condition expression that conditionally limits records
Arranges records by similar values
GROUP BY fieldlist
Sorts records by a field or fields
ORDER BY fieldlist
Determines which records make it to a group