1--update query example
2 UPDATE table_name
3 SET column1 = value1, column2 = value2, ...
4 WHERE condition;
1UPDATE table_name
2SET column1 = value1, column2 = value2, ...
3WHERE condition
1UPDATE table_name
2SET column1 = value1, column2 = value2...., columnN = valueN
3WHERE [condition];
4
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;
1Mit UPATE werden Datenwerte in der Datenbank aktualisiert. Nach Bedürfnis
2können auch mehrere Datensätze auf einmal verändert werden. Mit WHERE werden
3nur bestimmte Datensätze zu aktualisiert.
4
5 UPDATE suppliers
6 SET supplier_id = 50,
7 supplier_name = 'Apple',
8 city = 'Cupertino'
9 WHERE
10 supplier_name = 'Google';
11
1
2 UPDATE Customers
3
4 SET ContactName = 'Alfred Schmidt', City= 'Frankfurt'
5
6 WHERE CustomerID = 1;
7
8 Sql("UPDATE MembershipTypes SET NAME = 'Pay As You Go' WHERE Id = 1");
9