Home »
MCQs »
MySQL MCQs
Suppose you have two columns named student_name and student_department inside table student_details and you are asked to update the value of these two columns where ID=4 then what statement you will write?
23. Suppose you have two columns named student_name and student_department inside table student_details and you are asked to update the value of these two columns where ID=4 then what statement you will write?
- UPDATE student_details SET Student_name="ram", Student_department='Chemical' WHERE ID='4';
- UPDATE table student_details SET column_name Student_name="ram", Student_department='Chemical' WHERE ID='4';
- UPDATE student_details SET Student_name="ram" and Student_department='Chemical' WHERE ID='4';
Answer: A) UPDATE student_details SET Student_name="ram", Student_department='Chemical' WHERE ID='4';
Explanation:
According to the given situation we will write,
UPDATE student_details SET Student_name="ram", Student_department='Chemical' WHERE ID='4';