sql training institute in ambala ! batra computer centre

Post on 12-Apr-2017

12 Views

Category:

Education

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Email: info.jatinbatra@gmail.com

BATRA COMPUTER CENTREISO CERTIFIED 9001:2008

Website: www.batracomputercentre.comPh. No.: 8222066670, 4000670

Email: info.jatinbatra@gmail.com

Website: www.batracomputercentre.comPh. No.: 8222066670, 4000670

Introduction๏A Business need๏Database

“An organized collection if information”Or

“Set of tables each having different class of data”

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

Email: info.jatinbatra@gmail.com

Website: www.batracomputercentre.comPh. No.: 8222066670, 4000670

What SQL can do?1. Execute queries against a database2. 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

Email: info.jatinbatra@gmail.com

Website: www.batracomputercentre.comPh. No.: 8222066670, 4000670

Email: info.jatinbatra@gmail.com

Website: www.batracomputercentre.comPh. No.: 8222066670, 4000670

Pre – requisites for SQL๏ Relational Database๏ Tables๏ Fields๏ Records๏ Different Relationships

» 1-1» 1-m

Email: info.jatinbatra@gmail.com

Website: www.batracomputercentre.comPh. No.: 8222066670, 4000670

SYNTAX

Email: info.jatinbatra@gmail.com

Website: www.batracomputercentre.comPh. No.: 8222066670, 4000670

SQL Queries

Email: info.jatinbatra@gmail.com

Website: www.batracomputercentre.comPh. No.: 8222066670, 4000670

Function QueriesFunction queries in SQL involve manipulating functions in SQL statements to retrieve desired information from the databaseSuch function queries are of two board categories:» Aggregate Function queries

» Scalar Function queries

Email: info.jatinbatra@gmail.com

Website: www.batracomputercentre.comPh. No.: 8222066670, 4000670

Email: info.jatinbatra@gmail.com

Website: www.batracomputercentre.comPh. No.: 8222066670, 4000670

SQL join QueriesSQL joins are used to query data from two or more tables, based on a relationship between certain columns in these tables.

Email: info.jatinbatra@gmail.com

Website: www.batracomputercentre.comPh. No.: 8222066670, 4000670

Inner JoinThe Inner JOIN keyword return rows when there is an least one match in both tablesSyntaxSELECT column_name(s)

FROM table_name1INNER JOIN table_name2ON table_name1.column_name=table_name2.column_name

Email: info.jatinbatra@gmail.com

Website: www.batracomputercentre.comPh. No.: 8222066670, 4000670

Outer JoinThe 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 intersectionAn outer join of A and B gives the results of A union B, i.e. the outer parts of a Venn diagram union

Email: info.jatinbatra@gmail.com

Website: www.batracomputercentre.comPh. No.: 8222066670, 4000670

Left Outer JoinThe left JOIN Keyword returns all rows from the left table (table_name1), even if there are no matches in the right table (table_name2)SyntaxSELECT column_name(s)FROM table_name1LEFT JOIN table_name2ON table_name1.column_name=table_name2.column_name

Email: info.jatinbatra@gmail.com

Website: www.batracomputercentre.comPh. No.: 8222066670, 4000670

Right Outer JoinThe RIGHT JOIN Keyword Return all rows from the right table (table_name2), even if there are no matches in the left table (table_name2)SyntaxSELECT column_name(s)FROM table_name1LEFT JOIN table_name2ON table_name1.column_name=table_name2.column_name

Email: info.jatinbatra@gmail.com

Website: www.batracomputercentre.comPh. No.: 8222066670, 4000670

Full JoinThe FULL JOIN keyword return rows when there is a match in one of the tables.SyntaxSELECT column_name(s)FROM table_name1LEFT JOIN table_name2ON table_name1.column_name=table_name2.column_name

Email: info.jatinbatra@gmail.com

Website: www.batracomputercentre.comPh. No.: 8222066670, 4000670

Email: info.jatinbatra@gmail.com

Website: www.batracomputercentre.comPh. No.: 8222066670, 4000670

ADDRESS:

SCO -15, Dayal Bagh,

Near Hanuman Mandir

Ambala Cantt-133001

Haryana

Ph. No.: 9729666670, 8222066670 &0171-4000670

Email ID: info.jatinbatra@gmail.com

Website: www.batracomputercentre.com

Email: info.jatinbatra@gmail.com

Website: www.batracomputercentre.comPh. No.: 8222066670, 4000670

top related