Monday, November 25, 2013

What is SQLCODE -922 ?

Authorization failure

What is the difference between Primary Key & Unique index ?

Primary : a relational database constraint Primary key consists of one or more columns that uniquely identify a row in the table For a normalized relation, there is one designated primary key 
Unique index: a physical object that stores only unique values There can be one or more unique indexes on a table.

What is a Cluster Index ?

Causes the data rows to be stored in the order specified in the index A mandatory index defined on a partitioned table space.

What is QUIESCE?

A QUIESCE flushes all DB2 buffers on to the disk This gives a correct snapshot of the database and should be used before and after any IMAGECOPY to maintain consistency.

How do you retrieve the first 5 characters of FIRSTNAME column of DB2 table EMP ?

SQL Query : SELECT SUBSTR(FIRSTNAME,1,5) FROM EMP;