Sql - Structured Query Language

843 views

Published on

Structured Query Language

Published in: Education, Technology
  • Be the first to comment

Sql - Structured Query Language

  1. 1. DDL DMLOutline History What is SQL Statement
  2. 2. SQL Structured Query LanguageSpecial-purpose programming language forworking with sets of facts and therelationships between them. DML SQL DDL
  3. 3. History SQL Develop by IBM 1970s Donald D. Chamberlin and Raymond F. BoyceInitial version SEQUEL (Structured English Query Language)
  4. 4. DDL Data Definition Language CREATE an object (a table) in the database TRUNCATE deletes all data from a tableALTER modifies the structure of an existing object DROP delete an object
  5. 5. Data Manipulation Language DML INSERT Adds rows to an existing table UPDATE Modifies a set of existing table rows DELETE Removes existing rows from a table
  6. 6. INSERT
  7. 7. UPDATE
  8. 8. DELETE
  9. 9. Select Statement Tables Data What tables contain the data How data from different sources is related CriteriaWhich fields or calculations will produce the data Criteria that data must match to be included Whether and how to sort the results Data Retrieval
  10. 10. SelectStatement BasicSELECT <field>FROM <table>WHERE <criterion>; Example SELECT name, address FROM student WHERE stuID=123;

×