Oracle
1Z0-061 · Question #165
See the Exhibit and examine the structure of ORD table: Evaluate the following SQL statements that are executed in a user session in the specified order: CREATE SEQUENCE ord_seq; SELECT…
The correct answer is A. All the statements would execute successfully and the ORD_NO column would contain the value 2. See the full explanation below for the reasoning.
Question
See the Exhibit and examine the structure of ORD table:
Evaluate the following SQL statements that are executed in a user session in the specified order:
CREATE SEQUENCE ord_seq; SELECT ord_seq.nextval FROM dual; INSERT INTO ord VALUES (ord_seq.CURRVAL, '25-jan-2007, 101); UPDATE ord SET ord_no= ord_seq.NEXTVAL WHERE cust_id =101; What would be the outcome of the above statements?
Exhibit
Options
- AAll the statements would execute successfully and the ORD_NO column would contain the value 2
- BThe CREATE SEQUENCE command would not execute because the minimum value and
- CThe CREATE SEQUENCE command would not execute because the starting value of the
- DAll the statements would execute successfully and the ORD_NO column would have the value 20
How the community answered
(55 responses)- A84% (46)
- B5% (3)
- C9% (5)
- D2% (1)
Community Discussion
No community discussion yet for this question.
