单项选择题
Given table T1 has column I1 containing the following data:
I1
1 2 3 4
If the following sequence of SQL statements is applied within a single unit of work:
UPDATE t1 SET i1 = 3 WHERE i1 = 2; S AVEPOINT s1 ON ROLLBACK RETAIN CURSORS; UPDATE t1 SET i1 = 5 WHERE i1 = 3; SAVEPOINT s2 ON ROLLBACK RETAIN CURSORS;INSERT INTO t1 (i1) VALUES (6); ROLLBACK TO SAVEPOINT s1; UPDATE t1 SET i1 = 2 WHERE i1 = 4; COMMIT;
What is the expected sequence of values returned from?()
SELECT i1 FROM t1 ORDER BY i1
A. 1, 2, 3, 3
B. 1, 2, 2, 4
C. 1, 2, 3, 3, 6
D. 1, 2, 2, 5, 6
相关考题
-
单项选择题
Given the following two tables: TAB1 C1 C2 1 Antarctica 2 Africa 3 Asia 4 Australia TAB2 CX CY 5 Europe 6 North America 7 South America Which of the following SQL statements will insert all rows found in table TAB2 into table TAB1?()
A.INSERT INTO tab1 SELECT cx, cy FROM tab2
B.INSERT INTO tab1 VALUES (tab2.cx, tab2.cy)
C.INSERT INTO tab1 VALUES (SELECT cx, cy FROM tab2)
D.INSERT INTO tab1 (c1, c2) VALUES (SELECT cx, cy FROM tab2) -
单项选择题
Given that tables T1 and T2 contain the following rows: Table T1: C1 C2 5 4 5 2 5 5 Table T2: C1 C2 5 1 5 2 5 3 Which of the following queries will return only those rows that exist in T1 and not in T2?()
A.SELECT * FROM T1 MINUS SELECT * FROM T2
B.SELECT * FROM T1 EXCEPT SELECT * FROM T2
C.SELECT * FROM T2 UNION EXCEPT SELECT * FROM T1
D.SELECT * FROM T1 NOT EXISTS SELECT * FROM T2 -
单项选择题
How should the following UDF be invoked in order to convert US currency values stored in the EXPENSES table into Canadian currency?CREATE FUNCTION getratews11 ( country1 VARCHAR(100), country2 VARCHAR(100) ) RETURNS DOUBLE LANGUAGE SQL CONTAINS SQL EXTERNAL ACTION NOT DETERMINISTIC BEGIN ... END()
A.CALL getratews11('USA','CANADA')
B.CALL expenses.getratews11('USA','CANADA')
C.SELECT getratews11('USA','CANADA') FROM expenses
D.SELECT * FROM TABLE(getratews11('USA','CANADA')) AS convert_currency
