1.1.1 Basic syntax for writing a SELECT statement
- Column name:
-
Specify the column from which search results are retrieved (the column to display). Multiple column names can be specified.
- Name of table to search:
-
In the FROM clause, specify the table to be searched. Multiple table names can be specified.
- Search conditions (retrieval criteria):
-
In the WHERE clause, specify the search conditions to narrow down the retrieval data. You can use AND and OR to connect multiple search conditions in a WHERE clause.
Example: WHERE "USERID">='U00600' AND "SEX"='M'
If you execute the following SELECT statement, the retrieved results will be as shown below.
SELECT "USERID","NAME" FROM "USERSLIST" WHERE "USERID">='U00600'
-
Configuration of table to be searched (customer table USERSLIST)
-
Retrieval results
- Note
-
For details about the syntax of search conditions, FROM clauses, and WHERE clauses, see the following:
-
FROM clauses: 7.5.1 Specification format and rules for FROM clauses
-
WHERE clauses: 7.6.1 Specification format for WHERE clauses
-
Search conditions: 7.18.1 Specification format and rules for search conditions
-