Home »
MCQs »
MySQL MCQs
Suppose you have a table named to test and inside this table you have a column named CGPA now if you are asked to change the column named CGPA to total percentage, using alter command then which of the following statement you will write?
19. Suppose you have a table named to test and inside this table you have a column named CGPA now if you are asked to change the column named CGPA to total percentage, using alter command then which of the following statement you will write?
- ALTER TABLE test CHANGE COLUMN 'cgpa’ 'total_percentage’ int;
- ALTER test table CHANGE 'cgpa’ ,'total_percentage’ int;
- ALTER TABLE test CHANGE 'cgpa 'total_percentage’ int;
Answer: A) ALTER TABLE test CHANGE COLUMN 'cgpa’ 'total_percentage’ int;
Explanation:
we will use the following syntax,
ALTER TABLE test CHANGE COLUMN 'cgpa' 'total_percentage' int;