To update a single entry of an MySQL table use:
UPDATE tablename SET columnname = 'NewValue' WHERE condition;
For example on this table called "DriverTable"
| Car | Driver |
|--------|-----------|
| Fiesta | Kev |
| Escort | Tim |
| Vectra | Stu |
To update the driver of the Escort to Fred we'd use:
UPDATE DriverTable SET Driver = 'Fred' WHERE Car = 'Escort';
Friday, 23 April 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment