• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Sql
 

Sql

on

  • 991 views

 

Statistics

Views

Total Views
991
Views on SlideShare
988
Embed Views
3

Actions

Likes
0
Downloads
38
Comments
0

2 Embeds 3

http://www.linkedin.com 2
http://www.slideshare.net 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Sql Sql Presentation Transcript

    • Focused more for my understanding.
      • SQL stands for Structured Query Language
      • The standardized relational database language for querying, manipulating, and updating information in a relational database
      • According to ANSI (American National Standards Institute), it is the standard language for relational database management systems.
      • The first form of SQL was called  SEQUEL
      • SQL is a simple non-procedural language
      • SQL can execute queries against a database
      • SQL can retrieve data from a database
      • SQL can insert records in a database
      • SQL can update records in a database
      • SQL can delete records from a database
      • SQL can create new databases
      • SQL can create new tables in a database
      • SQL can create stored procedures in a database
      • SQL can create views in a database
      • SQL can set permissions on tables, procedures, and views.
      • A complete command or statement written in the SQL language
      • SQL statements are used to perform tasks such as update data on a database, or retrieve data from a database
      • SQL is not case sensitive
      • Some database systems require a semicolon at the end of each SQL statement.
      • Data Manipulation Language (DML)
        • SQL for retrieving and storing data.
      • Data Design Language (DDL)
        • SQL for creating, altering and dropping tables.
      • Data Control Language
        • Handles the authorization aspects of data
      • Transactional Controls
        • can be used to wrap around the DML operations:
      • SELECT  - extracts data from a database
      • UPDATE  - updates data in a database
      • DELETE  - deletes data from a database
      • INSERT INTO  - inserts new data into a database
      • CREATE DATABASE  - creates a new database
      • ALTER DATABASE  - modifies a database
      • CREATE TABLE  - creates a new table
      • ALTER TABLE  - modifies a table
      • DROP TABLE  - deletes a table
      • CREATE INDEX  - creates an index (search key)
      • DROP INDEX  - deletes an index
      • GRANT - to allow specified users to perform specified tasks.
      • REVOKE - Viceversa.
      • BEGIN – To begin the Transaction
      • COMMIT – Accept and do the changes done by the executed statement
      • ROLLBACK – Undo and do not update the changes done by the executed statement
      • END – To end the Transaction
      • To retrieve or update data from multiple table, JOIN’s are used.
      • The JOIN keyword is used in an SQL statement to query data from two or more tables, based on a relationship between certain columns in these tables.
      • JOIN : Return rows when there is at least one match in both tables
      • LEFT JOIN : Return all rows from the left table, even if there are no matches in the right table
      • RIGHT JOIN : Return all rows from the right table, even if there are no matches in the left table
      • FULL JOIN : Return rows when there is a match in one of the tables
      • Inner Join - An inner join requires each record in the two joined tables to have a matching record.
        • Equijoin - is a specific type of comparator-based join
        • Natural join - The resulting joined table contains only one column for each pair of equally-named columns.
        • Cross Join -  A cross join returns the cartesian product of the sets of records.
      • Outer Join - An outer join does not require each record in the two joined tables to have a matching record.
        • Left Outer Join
        • Right Outer Join
        • Full Outer Join
      • For a table to qualify as  left  or  right  its name has to appear after the FROM or JOIN Keyword respectively
      • SELF JOIN - A self-join is joining a table to itself.
      • Learn SQL
      • Joins