SQL
SELECT Statement:
Syntax:
SELECT column1, column2....columnN
FROM
table_name
SELECT: Identify what columns
FROM : Identify which table
Examples :1. Select * from Employee ; It will Display all Details from Employee Table.
2 . Select * from Department ; It will Display all Details from Department Table.
3. Select * from Table ; List all the Table .
SQL
DISTINCT Clause:
We should use DISTINCT to select only Unique value from Table.
Syntax:
SELECT
DISTINCT column1, column2....columnN
FROM
table_name;
Examples : 1 : Select DISTINCT Department number from Employee ;
SQL
WHERE Clause:
WHERE is Used for Restricting the Record to be Displayed .
Syntax:
SELECT
column1, column2....columnN
FROM table_name
WHERE
CONDITION;
Examples :
1. Select * from Employee WHERE Department number =10 ; It will Display all employee Details only from Department number =10.
2. Select Employee Name, Salary WHERE Job =' MANAGER' ; ( Here MANAGER is case sensitive)
3. Select * from Employee Where Hire Date = '03-Dec-2012' ;
No comments:
Post a Comment