empid name empid weeknumber paycheck
1 USER1 1 1 1000.00
2 USER2 1 2 1000.00
2 1 2000.00
TABLEB was defined as follows:
CREATE TABLE tableb (empid CHAR (3),
weeknumber CHAR (3),
paycheck DECIMAL (6, 2),
CONSTRAINT const1 FOREIGN KEY (empid)
REFERENCES tablea (empid) ON DELETE RESTRICT)
How many rows would be deleted from tableb if the following command was issued?
DELETE FROM tablea WHERE empid = '2'
A. 0
B. 1
C. 2
D. 3
C 11. Given the SQL statement:
ALTER TABLE table1 ADD col2 INT WITH DEFAULT
Which of the following is the result of the statement?
A. The statement fails because no default value is specified.
B. A new column called COL2 is added to TABLE1 which would have a null value if selected.
C. A new column called COL2 is added to TABLE1 which would have a value of zero if selected.
D. A new column called COL2 is added to TABLE1 which would require the default value to be set before working with the table.
会员注册
会员登录
个人空间