Loading, please wait...

Update query

How To Use Update query In SQL

 

Introduction:
In this article, you will learn, what update query is and how to use update query in SQL.

The update query is used to change the set of records in the current field according to our search conditions. This is the best feature of RDBMS. This statement is used to change a large amount of data at one time but can’t add or remove any data from a database.

 

Syntax

The basic syntax of UPDATE query with WHERE clause is as follows:

update table_name set column1 = value1, column2 = value2...., columnN = valueN where [condition];

 

Example

Step 1: First we write our update query.

 

 

 

Now select the query and execute this.

 

 


Step 2: Employee table has the records, given above.

 

After the updation, our output is:

 

 

Summary:
Thus, we learned that update query is used to update the data in SQL.