SQL- Structured Query Language is a standard language used for accessing and manipulating databases. It is declared as standard by American National Standards Institute (ANSI) and International Organization for Standardization (ISO) in 1986 and 1987 respectively.
Though SQL is standard language, different versions are maintained to meet out the requirements. Few major functions performed using SQL are listed below:
• Executes queries against a database.
• Retrieves data from database.
• Inserts and updates records in a database
• Delete records from database.
• Creates new databases and new tables in a database.
Different SQL commands are available to perform various functions. SQL commands are classified into five major categories depending on their functionality. See Table 3.13
The DDL commands are used to define database schema (Structure). Also to create and modify the structure of the database object in the database. CREATE, ALTER, DROP,RENAME and TRUNCATE commands belongs to this category.
These SQL commands deals with the manipulation of data present in the database. Most of SQL commands come under DML. INSERT, UPDATE, and DELETE commands belong to this category. See Table 3.14
SELECT is the only SQL command used to fetch or retrieve the data from database tables that come under DQL. See Table 3.15
These SQL commands manage the transactions in SQL databases. It also helps to save the change into database permanently. COMMIT, ROLLBACK, SET TRANSACTION and SAVEPOINT commands belongs to this category. See Table 3.16
The SQL commands that implement security on database objects like table, view, stored procedure etc. GRANT and REVOKE commands belongs to this category. See Table 3.17