Multiple choice technology databases

Which of the following SQL statement create a sequence SE with starting value as 30 and in increments of 20?

  1. GENERATE SEQUENCE SE START WITH 30 ADD BY 20;

  2. CREATE SEQUENCE SE START WITH 30 ADD BY 20;

  3. CREATE SEQUENCE SE START WITH 30 INCREMENT BY 20;

  4. GENERATE SEQUENCE SE INITIATE WITH 30 INCREMENT BY 20;

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The standard SQL syntax to define a sequence with a custom start value and step increment uses CREATE SEQUENCE combined with the START WITH and INCREMENT BY clauses. The other options use invalid keywords such as GENERATE, ADD BY, or INITIATE WITH.