1--update query example
2 UPDATE table_name
3 SET column1 = value1, column2 = value2, ...
4 WHERE condition;
1# SQL Server
2UPDATE
3 Sales_Import
4SET
5 Sales_Import.AccountNumber = RAN.AccountNumber
6FROM
7 Sales_Import SI
8INNER JOIN
9 RetrieveAccountNumber RAN
10ON
11 SI.LeadID = RAN.LeadID;
12# MySQL & MariaDB
13UPDATE
14 Sales_Import SI,
15 RetrieveAccountNumber RAN
16SET
17 SI.AccountNumber = RAN.AccountNumber
18WHERE
19 SI.LeadID = RAN.LeadID;
1UPDATE YourTable
2SET Col1 = OtherTable.Col1,
3 Col2 = OtherTable.Col2
4FROM (
5 SELECT ID, Col1, Col2
6 FROM other_table) AS OtherTable
7WHERE
8 OtherTable.ID = YourTable.ID
1-- sql update using string format
2String = "UPDATE yourtable SET yourcolumn = '" + yourvealueintext + "' WHERE column = " + item_to_compare_the_position_of_Your_Column;
3 -- or
4String = "UPDATE yourtable SET yourcolumn = " + yourvalue_in_number + " WHERE column = " + item_to_compare_the_position_of_Your_Column;