How to update the records?

To change the values in some columns of a table, you have to use the SQL statement, UPDATE with the following syntax

Syntax

UPDATE tablename SET columnname1=value1, columnname2=value2, … WHERE condition;

Example

Write the SQL statement to update the price of the book number 101 to 450.

USE demodb;

UPDATE book SET price=450 WHERE booknumber=101;

Comments

Popular posts from this blog

What SQL can do?

What are different data types to manage data in the columns or fields?

What is SQL?