220 likes | 520 Views
Introduction to SQL. By Ping Bai. What is SQL?. Structured Query Language (abbreviated SQL) is a computer language for communication with databases. The statement contains instructions to create, read, change or delete data.
E N D
Introduction to SQL By Ping Bai
What is SQL? • Structured Query Language (abbreviated SQL) is a computer language for communication with databases. • The statement contains instructions to create, read, change or delete data. • The universal rules of the language have been established by ANSI (American National Standards Institute). • SQL language is open, meaning it is not owned or controlled by any single company.
What Does SQL Do? • Read existing data • Create new records holding data • Change existing data • Delete data
What Does SQL Not Do? • SQL is not a program or a development environment such as Access or VB. • SQL does not have a back end. • SQL is not a procedural programming language. • SQL does not have its own specific development environment.
A Brief History of SQL • Dr. Codd • System/R in 1978 - IBM • Oracle • Relational Technology’s Ingres • SQL/DS and DB2 in 1982 - IBM
SQL Queries • SELECT LastName FROM Persons;
SQL Data Manipulation Language(DML) • SELECT - extracts data from a database table • UPDATE – updates data in a database table • DELETE – deletes data from a database table • INSERT INTO – inserts new datainto a database table
SQL Data Definition Language(DDL) • CREATE TABLE – creates a new database table • ALTER TABLE – alters a database table • DROP TABLE – deletes a database table • CREATE INDEX – creates an index (search key) • DROP INDEX – delete an index
SQL Tutorials • http://www.geocities.com/SiliconValley/Vista/2207/sql1.html • http://sqlzoo.net/ • http://riki-lb1.vet.ohio-state.edu/mqlin/computec/tutorials/SQLTutorial.htm