Computer Science, asked by phenomservicesrcr, 6 months ago

state the purpose of update command with the help of an example​

Answers

Answered by Nirnay488
71

Answer:

UPDATE Command. An UPDATE statement is used to directly change or modify the values stored in one or more fields in a specified record in a single table. UPDATE changes the values of the specified columns in all rows that satisfy the condition. ... An expression or a value to assign to a column.

Answered by zumba12
0

The replace command is an information manipulation command that is used to edit the data of a desk. It can be used to replace a single row primarily based totally on a circumstance, all rows, or a hard and fast of rows primarily based totally on the circumstance given with the aid of using the user.

Example:

  • The UPDATE assertion in SQL is used to replace the records of a present desk in the database. We can replace single columns in addition to a couple of columns with the use of the UPDATE declaration as consistent with our requirement.
  • UPDATE table_name SET column1=value1, column2 = value2,..
  • WHERE circumstance;
  • table_name: call of the tablecolumn1: call of first, second, 0.33 column...value1: the brand new cost for the 1st, second, and 0.33 column. Circumstance: circumstance to pick the rows for which the values of columns want to be updated.
  • In the above query, the SET announcement is used to set new values to the unique column, and the WHERE clause is used to pick the rows for which the columns are had to be updated.  

If we've got now no longer used the WHERE clause then the columns in all of the rows could be updated. So the WHERE clause is used to pick out the unique rows.

#SPJ2

Similar questions