हिंदी

Write any two differences between UPDATE and ALTER TABLE commands of MySQL.

Advertisements

प्रश्न

Write any two differences between UPDATE and ALTER TABLE commands of MySQL. 

अंतर स्पष्ट करें
Advertisements

उत्तर

The following are the main differences between MySQL's UPDATE and ALTER TABLE commands:

S. No. UPDATE ALTER TABLE
1. Use the UPDATE command to change already-existing records or rows in a table. It modifies the values of one or more columns in rows that already exist. A table's structure can be changed using the ALTER TABLE command. It lets you change, add, or remove constraints, indexes, columns, and other table elements.
2. Within a table, the UPDATE command functions at the row level.  Table-level operations are carried out with the ALTER TABLE command.
3. The UPDATE command can be used with the WHERE clause. The ALTER command cannot be used with the WHERE clause.
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2023-2024 (March) Set 4
Advertisements
Share
Notifications



      Forgot password?
Use app×