PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

Which of the following INSERT statements will fail?

If the following statement is executed:
CREATE TABLE employee
(empid INT NOT NULL GENERATED BY DEFAULT
AS IDENTITY (START WITH 1, INCREMENT BY 5),
name VARCHAR(20),
dept INT CHECK (dept BETWEEN 1 AND 20),
hiredate DATE WITH DEFAULT CURRENT DATE,
salary DECIMAL(7,2),
PRIMARY KEY(empid),
CONSTRAINT cst1 CHECK (YEAR(hiredate) > 2006 OR
Salary > 60500));
Which of the following INSERT statements will fail?

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?


Page 639 of 1,258« First...102030...637638639640641...650660670...Last »