单项选择题A UDT is a data type which:()

A.must contain unique values.
B.cannot be CAST to other data types.
C.is created using the CREATE DISTINCT command.
D.contains a value that was automatically calculated from values in other columns.


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题Which of the following DB2 data types has a fixed length?()

A.XML
B.BLOB
C.DOUBLE
D.DBCLOB

2.单项选择题Which of the following actions may cause a trigger to be fired?()

A.DROP
B.ALTER
C.DELETE
D.ROLLBACK

3.单项选择题What type of constraint is used to ensure that each row inserted into the EMPLOYEE table with a value in the WORKDEPT column has a row with a corresponding value in the DEPTNO column of the DEPARTMENT table?()

A.A check constraint on the EMPLOYEE table
B.A unique constraint on the EMPLOYEE table WORKDEPT column
C.A foreign key reference from the DEPARTMENT tables DEPTNO column to the WORKDEPT column of the EMPLOYEE table
D.A foreign key reference from the EMPLOYEE tables WORKDEPT column to the DEPTNO column of the DEPARTMENT table

5.单项选择题A view is created with the following statement:CREATE VIEW v1 AS SELECT col1, col2, col3 FROM t1 WHERE col4 > 1000 ; When will DB2 access the data from table T1 for view V1?()

A.When view V1 is created
B.Each time the REFRESH VIEW v1 statement is executed
C.Each time an SQL statement is executed against view V1
D.Only the first time an SQL statement is executed against view V1

6.单项选择题

A table was created using the following DDL:
CREATE TABLE employee (id SMALLINT NOT NULL, name VARCHAR(9), dept SMALLINT CHECK (dept BETWEEN 10 AND 100),
job CHAR(10) CHECK (job IN ('Sales','Mgr','Clerk')), hiredate DATE, salary DECIMAL(7,2), comm DECIMAL(7,2), PRIMARY KEY (id), CONSTRAINT yearsal CHECK (YEAR(hiredate) > 2004 OR salary > 80500) );
Which of the following INSERT statements will fail?()

A.INSERT INTO employee VALUES (2, 'Smith', 80, 'Mgr', '09/03/2006', 80000, NULL)
B.INSERT INTO employee VALUES (4, 'Smith', 86, 'Mgr', '07/14/2003', 90000, NULL)
C.INSERT INTO employee VALUES (1, 'Smith', 55, 'Sales', '07/14/2003', NULL, NULL)
D.INSERT INTO employee VALUES (3, 'Smith', 33, 'Analyst', '11/26/2006', 90000, NULL)

7.单项选择题

An application needs a table for each connection that tracks the ID and Name of all items previously ordered and committed within the connection. The table also needs to be cleaned up and automatically removed each time a connection is ended. Assuming the ITEMS table was created with the following SQL statement:
CREATE TABLE items item_no INT, item_name CHAR(5), item_qty INT)
Which of the following SQL statements will provide the table definition that meets the specified requirements?()

A.DECLARE GLOBAL TEMPORARY TABLE tracker AS (SELECT item_no, item_name FROM items) WITH NO DATA ON COMMIT PRESERVE ROWS ON DISCONNECT DROP TABLE
B.DECLARE GLOBAL TEMPORARY TABLE tracker AS (SELECT item_no, item_name FROM items) WITH NO DATA ON COMMIT PRESERVE ROWS
C.CREATE TABLE systmp.tracker AS (SELECT item_num, item_name FROM items) WITH NO DATA ON COMMIT PRESERVE ROWS
D.CREATE TABLE tracker AS (SELECT item_num, item_name FROM items) ON COMMIT PRESERVE ROWS ON DISCONNECT DROP TABLE

8.单项选择题Which of the following database objects can be used to raise an error if a table is updated?()

A.Package
B.Trigger
C.Stored Procedure
D.Informational Constraint

9.单项选择题Which of the following is a characteristic of a schema?()

A.Foreign key references cannot cross schema boundaries.
B.A DB2 user must be created before a schema with the same name can be created.
C.If no schema is specified when an object is created, the default schema PUBLIC is used.
D.A schema enables the creation of multiple objects in a database without encountering namespace collisions.

10.单项选择题Which of the following scenarios will ensure that the value of the NEXT_STEPNO column in a given row of table TABLEX exists as a value of column STEPNO (usually in another row) in the same table?()

A.Define a UNIQUE constraint on the columns NEXT_STEPNO and STEPNO.
B.Define a CHECK constraint on the NEXT_STEPNO column (NEXT_STEPNO = STEPNO).
C.Define column STEPNO as the primary key of TABLEX and column NEXT_STEPNO as a foreign key referencing column STEPNO of the same table.
D.Define column NEXT_STEPNO as the primary key of TABLEX and column STEPNO as a foreign key referencing column NEXT_STEPNO in the same table.

最新试题

Which of the following will begin a new unit of work?()

题型:单项选择题

Given the following two tables:TAB1 R1A A A B B C C D E TAB2 R2A A B B C C DWhich of the following queries returns the following result set? RETVAL E()

题型:单项选择题

An application needs to store a 5 MB JPEG image in a DB2 table. Which data type should be specified for the column that will be used for storing the image?()

题型:单项选择题

Which of the following constraint types can be used to ensure the value of an INTEGER column references only positive values?()

题型:单项选择题

Which of the following describes the objects of a DB2 database and their relationships?()

题型:单项选择题

Which of the following actions may cause a trigger to be fired?()

题型:单项选择题

An application needs a table for each connection that tracks the ID and Name of all items previously ordered and committed within the connection. The table also needs to be cleaned up and automatically removed each time a connection is ended. Assuming the ITEMS table was created with the following SQL statement:CREATE TABLE items item_no INT, item_name CHAR(5), item_qty INT)Which of the following SQL statements will provide the table definition that meets the specified requirements?()

题型:单项选择题

The EMPLOYEE table contains the following information: EMPNO NAME WORKDEPT101 SAM A11 102 JOHN C12 103 JANE -104 PAT Remote105 ANNE -106 BOB A11The MANAGER table contains the following information: MGRID NAME DEPTNO EMPCOUNT1 WU B01 - 2 JONES A11 - 3 CHEN - - 4 SMITH - -5 THOMAS C12 -After this statement is executed: UPDATE manager m SET empcount = (SELECT COUNT(workdept) FROM employee e WHERE workdept=m.deptno)What is the result of the following query?()SELECT mgrid, empcount FROM MANAGER WHERE empcount IS NOT NULL ORDER BY mgrid

题型:单项选择题

Which of the following statements is used to grant user TOM and Application team APPGRP the ability to add data to table TAB1?()

题型:单项选择题

A user needs to create a trigger that will update table T2 whenever a row is added to table T1. Assuming the user has all appropriate privileges for table T2, which privilege is required on table T1 to create the trigger?()

题型:单项选择题