TSO-ISPF JCL COBOL VSAM DB2 CICS Tools Articles Job Portal Forum Quiz Interview Q&A

DB2 - Structured Query Language(SQL) Types


SQL (Structured Query Language) is a language designed specifically for communicating with databases and is a powerful tool for manipulating data. It is the standard query language for relational database management systems (RDBMS).

It is a database-independent language that allows you to query data and to perform CRUD (Create, Update, and Delete) operations. SQL is easy to learn. The statements are all made up of descriptive English words.

SQL consists of three sublanguages as follows:

  1. DDL: Data Definition Language

  2. DML: Data Manipulation Language

  3. DCL: Data Control Language

image missing

DDL (Data Definition Language) creates and maintains physical data structures using the following statements:

  • Create: Creating the objects.
  • Alter: Changing the characteristics of the existing objects.
  • Drop: Deleting the objects.

DML (Data Manipulation Language) perform the following operations:

  • Insert
  • Update
  • Delete
  • Retrieval (Simple, multiple columns, all columns)
  • Sorting the retrieved data
  • Filtering the data
  • Concatenation
  • Using alias
  • Removing duplicates
  • Functions
  • Grouping
  • Subquery
  • Join
  • Union

DCL (Data Control Language) perform the following operations:

  1. Grant
  2. Revoke

Database Security is managed through the SQL GRANT and REVOKE statements.



If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!

Are you looking for Job Change? Job Portal