Open In App

SQL Full Form - Structured Query Language

Last Updated : 08 Jan, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

SQL stands for Structured Query Language and is used to manage and manipulate relational databases. SQL provides a standardized way to interact with databases, allowing users to create, retrieve, update, and delete data efficiently. SQL commands are used to perform various operations on databases.

What is SQL?

Structured Query Language (SQL) is a specialized programming language for managing relational database data. It allows users to store, manipulate, and retrieve data efficiently in databases like MySQL, SQL Server, Oracle, and more.

SQL is a declarative language laying its basics on relation algebra. It is a standardized language supported by all major commercial databases.

For a complete tutorial on SQL, Refer to our SQL Tutorial.

SQL Classification

The main classifications for SQL queries are:

1. Data Manipulation Language (DML)

It deals with queries related to inserting, deleting, and modifying rows.

2. Data Definition Language (DDL)

It deals with the creation, deletion, and modification of definitions for tables and views.

For complete classification for SQL queries refer to the SQL classification article.

Basic SQL Query Syntax

SELECT (attribute list)
FROM   (table list)
[WHERE (condition)]
[GROUP BY (grouping attributes)]
[HAVING (group condition)]
[ORDER BY (attribute list)] 

Note: The SELECT and FROM clauses are mandatory.

  1. The SELECT clause lists the attributes to be retrieved.
  2. The FROM Clause specifies all tables
  3. The WHERE clause specifies the conditions for the selection of records from these tables, including joint conditions.
  4. GROUP BY specifies grouping attributes
  5. HAVING specifies a condition for the retrieval of groups.

Various COUNT, SUM, MIN, MAX, and AVG can be in conjunction with grouping. ORDER BY specifies an order for displaying the result of a query.

SQL Characteristics

  • Tables, also called relations are represented by a name, not exceeding 20 characters in length.
  • The table names as well as the column fields should have unique names.
  • While the table definition, the field list is separated using commas, and each field name consists of a data type followed by a length attribute enclosed in brackets.
  • SQL statements must end with a semicolon.

Advantages of using SQL

  • High performance.
  • Easily compatible with most of the databases like MS Access, MS SQL server.
  • Good flexibility in terms of the creation of new Data Base tables and deletion of redundant tables.
  • Can handle large records and multiple transactions.
  • Easily accessible in the form of an open-source programming language.
  • High Security: Tables, procedures, and views can easily be protected using permissions
  • Easy to learn and understand data

Disadvantages of using SQL

  • Complex interface to understand and deal with it.
  • The higher cost required to set up.
  • It is a platform-dependent and compound-based language.
  • Extra space is required for each record storage.
  • Partial control is given to databases, due to hidden permissions.

Next Article
Article Tags :

Similar Reads