Thursday, 14 September 2017

SQL

SQL is structural query language.

I wanted to keep it simple to learn the SQL, so if we know the following 7 types of query then you can achieve to write any kind of sql queries.
  1. Simple query
  2. Sub query
  3. Joins
  4. Co-related query
  5. Set Operators
  6. Aggregate function and Group by clause
  7. Derived tables


Simple Joins

Simple Joins are the query where it will retrieve the data for the specific condition or to display the information for the non-conditions

Scenario 1;
The following query will display the data for the specific condition.

Select * 
from EMP
where sal=5000;

The following query will display the data for the non-specific condition.

Select * 
from EMP;