SQL is the standard language for dealing with relational databases. SQL can able to insert, search, update, and delete database records. SQL can perform many other operations, including optimizing and maintaining databases.

What is sql

SQL is used to communicate with databases. According to ANSI, SQL is the standard language for RDMS (relational database management systems). SQL statements are used for performing operations like updating data in the database and accessing data from the database.

SQL is a powerful tool for communicating with DBMS (database management systems).

What is SQL

SQL stands for Structured Query Language. Structured Query Language is used to perform tasks on the records, stored in the database for example making records, updating records, deleting records, creating and modifying tables, views, and so more.

SQL is just a query language This is not a database. To perform SQL queries, we need to set up an database, such as, Oracle, MySQL, MongoDB, SQL Server, DB2, etc.

SQL is storing, manipulating and accessing data records stored in the relational database.

Facts About SQL

SQL is case insensitive. But using keywords (such as SELECT, UPDATE, CREATE, etc.) in uppercase and user-defined things (such as table name, column name, etc.) in lowercase letters is a recommended practice.

We able to write comments in the SQL.

SQL is the programming language for relational databases such as MySQL, Oracle ,etc. another non-relational databases also known as NoSQL do not use SQL for example MongoDB, DynamoDB, etc.. most implementations differ slightly in a syntax.

So we can face queries that work in SQL Server but do not work in MySQL. SQL lets you access and manipulate databases

What Can SQL do

  • SQL can execute queries against the database
  • SQL can retrieve data from database
  • SQL can insert records into database
  • SQL can update records in database
  • SQL can delete records from database
  • SQL can create new databases
  • SQL can create new table in database
  • SQL can create stored procedures in a database
  • SQL can create a view in a database
  • SQL can set permissions on tables, processes, and views


  • To create new databases, tables and views
  • To insert a record into the database
  • To update the records in the database
  • To delete a record from a database
  • To retrieve data from a database

SQL is widely popular because it offers the following benefits: −

  • Allows users to access data in a relational database management system.
  • Allows users to describe data.
  • Allows users to define data in the database and manipulate that data.
  • Allows embedding in other languages using SQL modules, libraries & amp; Pre-compiler. SQL Allows users to create and drop databases and tables.
  • Allows users to create views, stored procedures, functions in a database.
  • Allows users to set permissions on tables, processes, and views.

SQL used for / Uses of SQL / Applications of SQL

SQL Used For following purpose

  • It helps users to access data in RDBMS system.
  • It helps you to describe the data.
  • This allows we to define data in a database and manipulate that specific data.
  • With the help of SQL you can create and drop databases and tables.
  • SQL provides you with the use of functions in the database, creating a view, and a stored procedure.
  • You can set permissions on tables, processes, and views.

Types of SQL Statements

There are five types of widely used SQL queries.

  1. Data Definition Language (DDL)
  2. Data manipulation language (DML)
  3. Data Control Language (DCL)
  4. Transaction Control Language (TCL)
  5. Data Query Language (DQL)

PPT on basic SQL commands

SQL Commands

The standard SQL commands interacts with a relational databases are :

  • and DROP.

These orders can be classified into the following groups based on their nature

These are some of the important SQL commands:

DDL - Data Definition Language

1.CREATEIt is used for create a new table, the view of a table, or another object in a database. Defines the database structure schema
2.ALTERModifies an existing database object, such as a table. It is used to modify the table.
3.DROPDelete's a view of an overall table, a table, and other object in the database. it Removes tables and databases.

DML - Data Manipulation Language

1.SELECTRetrieves some records from one or more tables. WHERE selects the attribute based on the condition described by the clause. It extracts data from the database.
2.INSERTCreates a record. Inserts data into the row of the table. It inserts new data into a database.
3.UPDATEupdates data in a database
4.DELETERemoves one or more rows from the table. This removes data from the database.

DCL - Data Control Language

1.GRANTGives the user privileges.
2.REVOKEWithdraws privileges granted from user.

SQL Language elements

Here are the important elements of SQL language:

  • Keywords : Each SQL statement consists of single or multiple keywords.
  • Identifiers : Identifiers are the names of objects in the database, for example user ID's, tables, and column's.
  • Strings : It can be expressions with CHAR or VARCHAR data types.
  • Expressions : Quotes are made up of many elements, such as constants, SQL operators, column names, and subcategories.
  • Search Terms : Terms are used to select a subset of rows from a table or to control statements such as IF statements to determine the flow control.
  • Special values : Special values should be used in expressions and as column defaults during the creation of tables.
  • Variables : SQL supports, local variables, global variables and connection level variables.
  • Comments : It is another element of SQL . Comment is used to append explanatory text to the SQL statements or blocks of the SQL statements. The database server doesn't execute any comments.
  • NULL Value : Use NULL, which helps to define a value that is unknown, missing.

Brief History of SQL

1974 - Structured Query Language appeared.

1978 - IBM released a product called System / R.

1986 - IBM develop a prototype of a relational database, standardized through ANSI.

1989 - First version of SQL launched

1999 - A SQL 3 is launched.

SQL 2003 - Window functions, XML-related features, and more.

SQL 2006 - Support for XML Query Language

SQL 2011 - Improved support for temporary databases