Use of UPDATE Statement in SQL

Use of UPDATE Statement in SQL:

(1) “UPDATE” statement is used to modify records.

(2) Syntax of “UPDATE” statement is:

UPDATE table_name
SET column1 = value1, column2 = value2, … column = valueN
WHERE condition;
 WHERE clause is used to specify which record should be modified.

(3) Let’s take an example to update/modify records in the Vendor table as shown.

(4) Select the database in the SQL server and click on the “New Query” button as shown.

Select the database in SQL server and click on the New Query

(5) After that new query editor open as shown.

SQL new query editor open

(6) After doing the above steps, write the query in the editor, as shown.

before update statement in sql
after executing update statement
after update sql

Source Code:

–// “UPDATE” statement
Update dbo.[CRONUS India Ltd_$Vendor$437dbf0e-84ff-417a-965d-
ed2bb9650972]
SET [Address] = ‘My First Update’
Where [No_] = ‘01254796’
–// “UPDATE” statement

Use of AND operator in SQL
SQL ORDER BY Statement
SQL WHERE Statement
How to configure GST Setup in Dynamics 365 BC
How to Fix 24 Hours or Military Time in BC D365
Format Property– Microsoft Docs

Leave a Reply