nerdexam
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

1Z0-061 question #165 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)
  • A
    84% (46)
  • B
    5% (3)
  • C
    9% (5)
  • D
    2% (1)

Community Discussion

No community discussion yet for this question.

Full 1Z0-061 Practice