Home »
MCQs »
MySQL MCQs
Which of the following is the correct syntax to add a field using alter command?
17. Which of the following is the correct syntax to add a field using alter command?
- ALTER TABLE table_name ADD field_name data type;
- ALTER TABLE table_name, field_name data type;
- ALTER TABLE field_name data type;
Answer: A) ALTER TABLE table_name ADD field_name data type;
Explanation:
To add a field using alter statement following syntax should be followed:
ALTER TABLE table_name ADD field_name data type;