![]() |
|
|
SQL explained: What is SQL | Select Statement | Select Where | Insert | Update/Edit | Delete | Order By | Select Between SQL Update StatementSyntax: UPDATE TableName Set ColumnName=Value WhereColumnName2=Value2 If we wanted to update the records from our table 'Members_tbl' in Diagram 1 where the LastName is Jones AND City is equal to Belfast and change the City column value to Belfast we could use the following update SQL statement. UPDATE Members_tbl Set City='Dublin' Where LastName='Jones' AND City='Belfast'
Diagram 2 shows the results of running our SQL Update.
If you were to run an SQL Update statement to update all the rows
in our table 'Members_tbl' (as it was in Diagram 1) where the City
column held the value Belfast then this would have an effect of
updating more than one record in our example. UPDATE Members_tbl Set City='Dublin' Where FirstName='Dave' OR City='Belfast'
Site developed by Michael Wall - Web Design Belfast N.Ireland. |
|