Home | Add to Favorites | Ebooks Directory | News  
SQL & PL/SQL  Resources
Home
SQL , PL/SQL  Article
SQL Tutorial 
Books
SQL  Questions
SQL Code
PL/SQL Tutorial
SQL Reference
SQL Tutorial

The SELECT statement
It is used to select data from a table.


 

Syntax

SELECT field_name(s)
FROM table_name

Example 1:

To select the columns named "LastName" and "FirstName"

SELECT LastName,FirstName FROM Employee

where "Employee" is the Table name

RESULT

Clove Peter 34
Waugh Steve 58
Clove Mark 65



Example 2:

To select all the columns , the following syntax is used

 

SELECT * FROM Employee

RESULT

Clove Peter 34
Waugh Steve 58
Clove Mark 65

Example 3

To select Distinct fields, use

SELECT DISTINCT LastName FROM Employee

RESULT

Clove
Waugh
                                                       Go To Index