How to use SQL UPDATE Statement

SQL UPDATE Statement


In this tutorial we know about the SQL UPDATE statement, first talking on update query, must read Introduction to SQL For Beginners and also know what is SQL Syntax. Also know about the SELECT Statement. As we know INSERT INTO statement for insert records or save data in database. After save records if we need to changes records then we use SQL UPDATE STATEMENT.  UPDATE statement update the tables records . Table contains rows and columns for save records.

SQL SELECT DISTINCT statement used for fetch different records. Select statement is also used with where clause and order by statement for conditional and sort the data result set. SQL stands for Structure query language in Relational Database Management System (RDBMS). SQL Syntax is the format in which data save, update, insert with the SQL commands.

What is SQL UPDATE statement?

First of all we discuss about database, A database contain table objects, there are many tables or one table in the database. Tables contains data in the form of records in the format of rows and also contains fields called columns. SQL INSERT INTO statement is always used for insert the records in database’s table object. Records is stored in table by rows and columns. New records insert in table with the insert query. When we need to changes records or data in database then use UPDATE STATEMENT. We can change one and many fields by the Update query.

SQL UPDATE statement Syntax:

UPDATE table_name
SET column1 = value1, column2 = value2, …
WHERE condition;

In this syntax of SQL Update query, we use table_name as our actual table name and update data in columns with values w.r.t column.  Data always depend on the type of column we used in our table structure. Mainly we use Update statement for modify records but when we need to update or modify particular fields with WHERE SQL statement.

You Must Read Also:

SQL Introduction For Beginners

How To Insert Records In Database Using C# Language

How to Remove Duplicate Data from Database

What is SELECT DISTINCT Statement

Know What is SQL Syntax

What Is SQL Select Statement

What is SQL ORDER BY Statement

How to use SQL INSERT INTO Statement



Leave a Comment