View video tutorial

ORACLE Comments

ORACLE

By using SQL SELECT statement we can extract data FROM database table.

Update in progress and will be completed shortly.

Thanks for being with us.

SELECT Syntax


SELECT *|{[DISTINCT] column [alias],...}
FROM table;
SELECT identifies the columns to be displayed.
• FROM identifies the table containing those columns.

Syntax Details

In its simplest form, a SELECT statement must include the following:
• A SELECT clause, which specifies the columns to be displayed
• A FROM clause, which identifies the table containing the columns that are listed in the 
SELECT clause
In the syntax:
SELECT Is a list of one or more columns
* Selects all columns
DISTINCT Suppresses duplicates
column|expression Selects the named column or the expression
alias Gives different headings to the selected columns 
FROM table Specifies the table containing the columns

Learning with Oracle Examples "Try Now"

You can copy the Oracle code to your project and see whether the result is similar to online output.

Example

SELECT table_name FROM user_tables;

Query Output

TABLE_NAME
----------------
REGIONS
COUNTRIES
LOCATIONS
DEPARTMENTS
JOBS
EMPLOYEES
JOB_HISTORY

7 rows selected.

Sample Code

Copy each file contents and paste it to your project, run and see the final output similar to online.

Example

SELECT * FROM JOBS;
Try it Now »

Click on the "Try it Now" button to see how it works.