top of page

Introduction to SQL

Wha is it?

  • Short for Structured Query Language

  • Sometime pronounce as the sequel.

  • SQL is a standard language for storing, manipulating and retrieving data in databases.

  • Microsoft SQL Server, MySQL, Oracle, Firebird SQL, PostgreSQL etc use SQL for querying with slight syntax differences.

  • SQL is a greater tool with web languages such as PHP, Python, Java, ASP etc to build dynamic web applications.

SQL Commands

  • SQL commands are instructions, coded into SQL statements.

  • These are used to communicate with the database to perform specific tasks, work, functions, and queries with data.

  • It is a very powerful and diverse database language use for storing data into databases. 

  • SQL is not case sensitive.

  • But SQL Data is a case sensitive.

  • Some database systems require a semicolon at the end of each SQL statement

Types of SQL Statements

  • SQL statements are divided into four main categories:

  • DML - Data Manipulation Language

  • DDL - Data Definition Language

  • DCL - Data Control Language

  • TCL - Transaction Control Language

  • SCL - Session Contol Language

SQL Language Staements

DML

  • SELECT

  • INSERT

  • UPDATE

  • DELETE

  • MEGE

DDL

  • CREATE

  • ALTER

  • DROP

DCL

  • GRANT

  • REVOKE

TCL

  • BEGIN

  • TRAN

  • COMMIT

  • ROLLBACK

SCL

  • SET ROLE

  • ALTER SESSION

DML

  • Data manipulation statement is used for managing data within table object.

DDL

  • Data definition statement are used to define the database structure or table.

DCL

  • Data control statement are use to give privileges to access limited data.

TCL

  • Transaction control statement are use to apply the changes permanently save into database.

SCL

  • Session control statement are manage properties dynamically of a user session.

History

  • Developed in 1970.

  • By Raymond and Donald Chamberlin at IBM.

  • Commercially released by Relational Software Inc.

Why SQL

  • Relational databases use GUIs for easier database management, and queries can now be simplified with graphical tools, e.g., drag-and-drop wizards.

  • However, learning SQL is imperative because such tools are never as powerful as SQL.

bottom of page