Multiple choice technology databases

CREATE TABLE Persons( P_Id int NOT NULL AUTO_INCREMENT=100, LastName varchar(255) NOT NULL);

  1. When trying to enter NULL value for P_Id then 100 will be placed there.

  2. P_Id value starts from 1 and then it is auto incremented by value 1 upto 100.

  3. Generates error as there is no constraint like "AUTO_GENERATE".

  4. P_Id value starts from 100 and then it is auto incremented by value 1.

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

In MySQL, the syntax AUTO_INCREMENT=100 at the column definition level (or table level depending on SQL dialect variations) is meant to set the initial value of the autoincrement sequence. The correct option identifies that values will start from 100 and increment by 1. Note that standard SQL dialects might require this at the table level, but in this context, option 4 is the intended correct answer.