Batra Computer Centre is An ISO certified 9001:2008 training Centre in Ambala.
We Provide SQL Training in Ambala. BATRA COMPUTER CENTRE provides best training in C, C++, S.E.O, Web Designing, Web Development and So many other courses are available.
3. Email: info.jatinbatra@gmail.com
Website: www.batracomputercentre.comPh. No.: 8222066670, 4000670
Structured Query Language (SQL)
๏ A language to communicate with the database
๏ A tool to retrieve the required information from database
๏ Elements
» Syntax of SQL is in plains English
» To question the database
4. Email: info.jatinbatra@gmail.com
Website: www.batracomputercentre.comPh. No.: 8222066670, 4000670
What SQL can do?
1. Execute queries against a database
2. Perform CRUD function:
» CREATE New database
New table in a database
Records in a database
» READ Retrieve data from a database
» Update Update Records in a database
» DELETE Delete records from a database
9. Email: info.jatinbatra@gmail.com
Website: www.batracomputercentre.comPh. No.: 8222066670, 4000670
Function Queries
Function queries in SQL involve manipulating functions
in SQL statements to retrieve desired information from
the database
Such function queries are of two board categories:
» Aggregate Function queries
» Scalar Function queries
12. Email: info.jatinbatra@gmail.com
Website: www.batracomputercentre.comPh. No.: 8222066670, 4000670
Inner Join
The Inner JOIN keyword return rows when there is
an least one match in both tables
Syntax
SELECT column_name(s)
FROM table_name1
INNER JOIN table_name2
ON table_name1.column_name=table_name2.column_name
13. Email: info.jatinbatra@gmail.com
Website: www.batracomputercentre.comPh. No.: 8222066670, 4000670
Outer Join
The outer join clause differs from the INNER JOIN in that row
are returned even when there are no matches through the JOIN
criteria on the second table.
Difference Explained:
Assuming you’re joining on columns with no duplicates, which is by
far the most common case:
An Inner join of A and B gives the results of A intersect B, i.e. the inner
part of a Venn diagram intersection
An outer join of A and B gives the results of A union B, i.e. the outer
parts of a Venn diagram union
14. Email: info.jatinbatra@gmail.com
Website: www.batracomputercentre.comPh. No.: 8222066670, 4000670
Left Outer Join
The left JOIN Keyword returns all rows from the left table
(table_name1), even if there are no matches in the right table
(table_name2)
Syntax
SELECT column_name(s)
FROM table_name1
LEFT JOIN table_name2
ON table_name1.column_name=table_name2.column_name
15. Email: info.jatinbatra@gmail.com
Website: www.batracomputercentre.comPh. No.: 8222066670, 4000670
Right Outer Join
The RIGHT JOIN Keyword Return all rows from the right table
(table_name2), even if there are no matches in the left table
(table_name2)
Syntax
SELECT column_name(s)
FROM table_name1
LEFT JOIN table_name2
ON table_name1.column_name=table_name2.column_name
16. Email: info.jatinbatra@gmail.com
Website: www.batracomputercentre.comPh. No.: 8222066670, 4000670
Full Join
The FULL JOIN keyword return rows when there is a match in one of the
tables.
Syntax
SELECT column_name(s)
FROM table_name1
LEFT JOIN table_name2
ON table_name1.column_name=table_name2.column_name