SQL


Structured Query Language, programming language used specifically for managing, querying, and manipulating data stored in Relational Database Management Systems (RDBMS)

Capabilities of SQL
Data Query Language (DQL): Used to fetch and view data from the database.

  • Key Command: SELECT

Data Manipulation Language (DML): Used to add, modify, or delete data records.

  • Key Commands: INSERT, UPDATE, DELETE

Data Definition Language (DDL): Used to define, change, or destroy the actual structure of the database (like creating tables).

  • Key Commands: CREATE, ALTER, DROP

Data Control Language (DCL): Used to manage security permissions and access rights.

Key Commands: GRANT, REVOKE

Data Types:
Numeric type:

  1. INT
  2. FLOAT
  3. DECIMAL

NON-NUMERIC DATA TYPE:

  1. CHAR
  2. VARCHAR
  3. ENUM(‘YES’,’NO)
  4. BOOLEAN

DATE AND TIME TYPE:

  1. DATE
  2. DATETIME
  3. TIME
  4. YEAR -> YYYY