Introduction

This tutorial explains the basic concepts of the IBM®DB2® database in a simplified way with clear DB2® examples and it covers the basics needed for preparations for DB2® certifications.

Start your database learning here.

Structured query language and DB2® Concepts :

Data Definition Language:

Data Manipulation Language:

Data Control Language:

SQL Data Types:

Embedded SQL:

Dynamic SQL:

SQLCODEs and Explanations:

Data Consistency:

Database Utilities:

Compilation and Binding:

System Catalog Tables:

Books and Links:

DB2 Interview Questions


Structured query language:

Data Definition Language:

The CREATE statement:

CREATE TABLE

NOT NULL in CREATE statement

NOT NULL WITH DEFAULT in create statement

CREATE VIEW

The ALTER statement:

The DROP statement:

Data Manipulation Language:

Simple SELECT statement:

Select query with WHERE clause:

Sub queries:

Correlated sub-query

The ORDER BY clause:

The JOINs:

Inner Join:

Left outer Join:

Right outer join:

Full outer Join:

The UNION and UNION ALL:

The GROUP BY clause:

The column functions:

The scalar function:

The INSERT statement:

The UPDATE statement:

The DELETE statement:

Data Control Language:

The GRANT statement:

The REVOKE statement:

SQL Data Types:

The SQL Data types and Descriptions:

Embedded SQL:

Program Layout:

DCLGEN:

SQLCA:

Representation of SQL statements:

Dynamic SQL:

The EXECUTE IMMEDIATE statement:

The PREPARE & EXECUTE statements

and the parameter maker (?):

Using Cursors in Dynamic SQL:

SQLCODEs and Explanations:

Meaning of SQLCODEs:

List of SQL codes and Descriptions:

Other Concepts:

Data Consistency:

COMMIT and ROLLBACK:

ISOLATION LEVELS:

LOCKS:

Database Utilities:

COPY,MERGE COPY:

LOAD,REORG:

CHECK DATA,CHECK INDEX:

QUIESCE,RECOVER:

RUNSTATS:

Compilation and Binding:

Precompilation:

COBOL Compilation:

LINK EDIT:

Binding:

Running the program from JCL:

System Catalog Tables:

Catalog Tables and Contents:

Useful queries on Catalog Tables:

Books and Links:

Useful Links:

Book references: