Oracle Select Statement
The Oracle SELECT
statement is used to fetch data from one or more database tables, views, object views etc. The result of the SELECT statement is called a result set.
Oracle SELECT Statement Syntax
To select the existing table, use the following syntax:
Syntax
SELECT Col1, Col2, Col3,...
FROM tablename
[WHERE conditions];
OR
SELECT * FROM tablename
[WHERE conditions];
Parameters:
tablename: The table name from which you want to fetch data.
conditions: The conditions optional parameter.
Oracle SELECT Statement examples for specified fields
The following Oracle statement to select or fetch data from existing table:
Example
SELECT firstName, lastName, address FROM tblCustomerLoan;
Note:
In the above example, we are fetching data for selected fields.
Oracle SELECT Statement examples for all fields
The following Oracle statement to select or fetch data for all fields from existing table:
Example
SELECT * FROM tblCustomerLoan;
Note:
In the above example, we are fetching data for all fields.