星期四, 9月 02, 2010

Tables in DB2 UDB

1. Suppose you want to create a table using the Create Table Wizard. Which DB2 tool do you need to use to access the wizard?

Command Center
Control Center
Development Center
Task Center



2. Suppose you want to create a table with the CREATE TABLE command and you want to include a column definition. Which parameter of the command do you need to replace with the column definition?

ColumnName
Element
TablespaceName
UniqueConstraint



3. Which DB2 table type temporarily stores data used by an application?

Base
Declared temporary
Result
Typed




4. Suppose you want to create the table - EMPLOYEES - with these columns: EMP_NAME with a character data type 50 characters long, EMP_ID with an integer data type, and EMP_SALARY with a decimal data type with a precision of 5 and a scale of 2. Data must be entered into each column. Which code do you need to execute to create this table?

CREATE TABLE EMPLOYEES (EMP_ID INTEGER, EMP_NAME CHAR(50), EMP_SALARY DECIMAL (5,2));
CREATE TABLE EMPLOYEES (EMP_ID INTEGER NOT NULL, EMP_NAME CHARACTER(5,2), EMP_SALARY DECIMAL (50) NOT NULL);
CREATE TABLE EMPLOYEES (EMP_ID INTEGER NOT NULL, EMP_NAME CHAR(50) NOT NULL, EMP_SALARY DECIMAL (5,2) NOT NULL);