Given the following statement:
SELECT hyear, AVG(salary)
FROM (SELECT YEAR(hiredate) AS hyear, salary
FROM employee WHERE salary > 30000)
GROUP BY hyear
Which of the following describes the result if this statement is executed?
A. The statement will return the year and average salary for all years that any employee had a salary greater than $30,000.
B. The statement will return the year and average salary for all employees hired within a given year that have a salary greater than $30,000.
C. The statement will return the year and average salary for all employees that have a salary greater than $30,000, sorted by year.
D. The statement will return the year and average salary for all years that every employee hired had a salary greater than $30,000.
正解:B
質問 2:
Which two of the following are optional and do not have to be specified when creating a table?
A. NOT NULL constraint
B. Table name
C. Default constraint
D. Column data type
E. Column name
正解:A,C
質問 3:
Given the requirements to store customer names, billing addresses, and telephone numbers, which of the following would be the best way to define the telephone number column for a table if all customers were located in the same country?
A. PHONE VARCHAR(15)
B. PHONE CHAR(15)
C. PHONE CLOB(1K)
D. PHONE LONG VARCHAR
正解:B
質問 4:
A view is created with the following statement:
CREATE VIEW v1 AS SELECT col1, col2, col3, col4 FROM t1 WHERE col4 > 1000 WITH CHECK OPTION
What is the effect of the CHECK OPTION clause?
A. Any row inserted or updated through view V1 must meet the condition that col4 > 1000.
B. Any row inserted or updated through view V1 must meet the condition that col4 > 1000 and no row in table T1 can be updated such that col4 <= 1000, but new rows in the table can be inserted with col4 <= 1000.
C. From now on, any row inserted or updated in table T1 must meet the condition that col4 > 1000, but existing rows in the table are not checked.
D. At view creation, DB2 will check the data in table T1, and if in any row doesn't meet the condition col4 > 1000, the view creation will be rejected.
正解:A
質問 5:
Which of the following is NOT a characteristic of a declared temporary table?
A. Once the application that created a global temporary table is terminated, any records in the table are deleted and the table is automatically destroyed
B. Declared temporary tables are not persistent and can only be used by the application that creates them
C. It is possible for many applications to create declared temporary tables that have the same name
D. Declared temporary tables are created by executing a CREATE TABLE statement with the DECLARED GLOBAL TEMPORARY clause specified
正解:D
質問 6:
Given the following DDL and INSERT statements:
CREATE VIEW v1 AS SELECT col1 FROM t1 WHERE col1 > 10;
CREATE VIEW v2 AS SELECT col1 FROM v1 WITH CASCADED CHECK OPTION;
CREATE VIEW v3 AS SELECT col1 FROM v2 WHERE col1 < 100;
INSERT INTO v1 VALUES(5);
INSERT INTO v2 VALUES(5);
INSERT INTO v3 VALUES(20);
INSERT INTO v3 VALUES(100);
How many of these INSERT statements will be successful?
A. 0
B. 1
C. 3
D. 2
正解:D
質問 7:
Application A currently holds an exclusive lock on a single row and application B tries to access that row. If lock timeout is set to -1 and both applications are using isolation level RS, which of the following will occur?
A. Application B will read the previous version of the row.
B. Applications A and B will cause a deadlock situation.
C. Application B will read the row and see uncommitted changes made by application A.
D. Application B will be placed in a lock-wait state until applicationA releases its lock.
正解:D
村田** -
A2090-730における重要な知識を整理している。ありがたい。同僚におすすめしようと思います。ありがとうございました。