Introduction to SQL

School:Computer Science -> Topic:Databases -> Topic:SQL

Search for SQL on Wikipedia.
Wikibooks has a book on the topic of Structured Query Language.

What is SQL?

SQL is an acronym for Structured Query Language used for managing databases. This unit introduces SQL concepts in terms of structure, client/server relationships, access control, language elements (syntax and semantics) and other common aspects.

There are mainly 3 kinds of statements in SQL:

  1. DDL (Data Definition Language)
  2. DML (Data Manipulation Language)
  3. DCL (Data Control Language)

SQL commands such as CREATE, ALTER & DROP are DDL commands. SQL commands such as INSERT, DELETE & UPDATE are DML commands. GRANT & REVOKE are DCL commands.

Note: All DDL statements are autocommitted; i.e. the user need not perform any commit after executing DDL statements. DML statements do not commit automatically.

For example: TRUNCATE is a DDL statement whereas DELETE is a DML statement.

TRUNCATE commits automatically.
DELETE does not commit automatically.

SQL was adopted as a standard by ANSI (American National Standards Institute) in 1986 and ISO (International Organization for Standardization) in 1987. This lesson is designed as a prerequisite for product-specific courses that cover the three principal client/server products:

Learners interested in SQL should participate at Topic:Databases and might also consider Topic:Object-relational databases.

Language basics

under construction - instructors needed

Resources


This article is issued from Wikiversity - version of the Tuesday, December 30, 2014. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.