www.SQLdemon.com    
  Home | Place like no other Learn | Things you should know Labs | Try what you know Stuff | Things you may need Blog | Latest things to discuss
 

Understanding SQL

SQL (Structured Query Language) is English like language that is used to design and communicate with the databases. It is designed efficiently to provide structured and standard guidelines to work in the database environment efficiently.

Standard SQL is governed by the ANSI standards committee, and it is supported by every major vendor although there are extended versions of SQL versions such as PL-SQL, Transact-SQL, etc...

In general, the SQL Statements have these attributes.

  • SQL Statements are not case-sensitive. (Unless it is explicitly indicated)
  • SQL Statements can be on one or more lines.
  • Keywords have to be used as it is and they cannot be split into multiple lines.
  • Clauses are usually placed in separate lines and indented to improve readability.
  • It is recommended to terminate a SQL statement with a semicolon “;”


SQL statements that will be covered in this tutorial series at SQL Demon can be broken into 4 categories and they are;

  • Data Manipulation Language (DML)
  • Data Definition Language (DDL)
  • Data Control Language (DCL)
  • Transaction Control (TCL)

The sections following will be describe each in detail.


Data Manipulation Language (DML)


These are used to retrieve a data from the database, enter new rows, change existing rows, and remove unwanted rows from the tables.

  • SELECT
  • INSERT
  • UPDATE
  • DELETE
  • MERGE

Data Definition Language (DDL)


These are used to Set up, change, and remove data structures such as tables in a database.

  • CREATE
  • ALTER
  • DROP
  • RENAME
  • TRUNCATE
  • COMMENT

Data Control Language (DCL)


Gives or removes access rights to both the database and the structures within it.

  • GRANT
  • REVOKE

Transaction Control Language (TCL)


Managers the changes made by DML statements. Changes to the data can be grouped together into logical transactions.

  • COMMIT
  • ROLLBACK
  • SAVEPOINT


Please navigate through the rest of the tutorials to learn about each individual SQL statement.