Which of the following INSERT statements will execute successfully?
Given the following statements:
CREATE TABLE table1 (col1 INTEGER, col2 CHAR(3));
CREATE VIEW view1 AS
SELECT col1, col2 FROM table1
WHERE col1 < 100
WITH LOCAL CHECK OPTION;
Which of the following INSERT statements will execute successfully?
How many rows will be deleted from TABLEA and TABLEB?
Given the following tables:
TABLEA
EMPIDNAME
—– ——-
1 USER1
2 USER2
TABLEB
EMPID WEEKNO PAYAMT
—– —— ——-
1 1 1000.00
1 2 1000.00
2 1 2000.00
and the fact that TABLEB was defined as follows:
CREATE TABLE tableb (empid SMALLINT,
weekno SMALLINT,
payamt DECIMAL(6,2),
CONSTRAINT const1 FOREIGN KEY (empid)
REFERENCES tablea(empid)
ON DELETE NO ACTION)
If the following command is issued:
DELETE FROM tablea WHERE empid=2
How many rows will be deleted from TABLEA and TABLEB?
Which of the following statements is NOT true?
The following triggers were defined for a table named SALES in the order shown:
CREATE TRIGGER trigger_a
NO CASCADE BEFORE UPDATE ON sales
REFERENCING NEW AS new
FOR EACH ROW
SET new.commission = sale_amt * .05
WHERE invoice = n.invoice;
CREATE TRIGGER trigger_b
AFTER INSERT ON sales
REFERENCING NEW AS new
FOR EACH ROW
UPDATE sales SET bill_date = CURRENT DATE + 30 DAYS
WHERE invoice = n.invoice;
CREATE TRIGGER trigger_c
NO CASCADE BEFORE DELETE ON sales
FOR EACH ROW
SIGNAL SQLSTATE ‘75005’
SET MESSAGE_TEXT = ‘Deletes not allowed!’;
Which of the following statements is NOT true?
Which of the following is NOT a difference between a unique index and a primary key?
Which of the following is NOT a difference between a unique index and a primary key?
Which of the following statements is true?
If the following SQL statement is executed:
CREATE TABLE sales
(invoice_no NOT NULL PRIMARY KEY,
sales_date DATE,
sales_amt NUMERIC(7,2))
IN tbsp0, tbsp1, tbsp2, tbsp3
PARTITION BY RANGE (sales_date NULLS FIRST)
(STARTING ‘1/1/2007′ ENDING ’12/31/2007’
EVERY 3 MONTHS)
Which of the following statements is true?
Which of the following isolation levels will lock all rows scanned to build a result data set?
Which of the following isolation levels will lock all rows scanned to build a result data set?
which of the following will occur?
Application A holds an Exclusive lock on table TAB1 and needs to acquire an Exclusive lock on
table TAB2. Application B holds an Exclusive lock on table TAB2 and needs to acquire an
Exclusive lock on table TAB1. If lock timeout is set to -1 and both applications are using the Read
Stability isolation level, which of the following will occur?
Which of the following can occur within this transaction’s processing?
A transaction using the Read Stability isolation level scans the same table multiple times before it
terminates. Which of the following can occur within this transaction’s processing?
what action will the deadlock detector take when it "wakes up" and discovers the deadlock?
Two applications have created a deadlock cycle in the locking subsystem. If lock timeout is set to
30 and both applications were started at the same time, what action will the deadlock detector take
when it “wakes up” and discovers the deadlock?
Which isolation level should Application B run under to achieve this objective?
Application A is running under the Repeatable Read isolation level and holds an Update lock on
table TAB1. Application B wants to query table TAB1 and cannot wait for Application A to release
its lock. Which isolation level should Application B run under to achieve this objective?