CBSE Class 12 Informatics Practices Question 11 of 79

MySQL SQL Revision Tour — Question 4

Back to all questions
4
Question

Question 4(a)

What is the use of UPDATE statement in SQL ? How is it different from ALTER statement ?

Answer

The UPDATE statement is used to modify existing records in a table. It specifies the rows to be changed using the WHERE clause, and sets the new data using the SET keyword. In contrast, the ALTER statement is used to modify the structure of a table, such as adding, modifying, or deleting columns, and adding or dropping constraints.