Kbase P177164: How to write a simple update statement in SQL?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/11/2010 |
|
Status: Unverified
GOAL:
How to write a simple update statement in SQL?
GOAL:
How to update a field in a record via sql?
FIX:
SQL UPDATE Syntax:
UPDATE table_name
SET column1=value, column2=value2,...
WHERE some_column=some_value
Note: Notice the WHERE clause in the UPDATE syntax. The WHERE clause specifies which record or records that should be updated. If you omit the WHERE clause, all records will be updated!
Example:Change name field/column where the value is currently bob to Lift Tours
SQLExplorer>update pub.customer
1> set name='Lift Tours'
2> where name='bob';
Update count = 1.