Vidyalelo
Database · Q10

Introduction to SQL

Programming · Database · question 10

Q10

Which of the following is valid SQL for an Index?

A.
CREATE INDEX ID;
Answer
B.
CHANGE INDEX ID;
C.
ADD INDEX ID;
D.
REMOVE INDEX ID;

Answer: Option A

Solution

Answer: Option A
Solution:
Option A: CREATE INDEX ID; - This option is correct. The CREATE INDEX statement in SQL is used to create an index on a table.
Option B: CHANGE INDEX ID; - There is no standard SQL command called CHANGE INDEX. This option is incorrect.
Option C: ADD INDEX ID; - There is no standard SQL command called ADD INDEX. This option is incorrect.
Option D: REMOVE INDEX ID; - There is no standard SQL command called REMOVE INDEX. This option is incorrect.
Conclusion:
In SQL, to create an index on a table, you use the CREATE INDEX statement followed by the index name. Therefore, the correct answer is Option A: CREATE INDEX ID;.