Notes
SQL- Edit
Content of the notes (1)
Page 1
SQL – Edit
Using SQL to change data on a database
• We
need the keywords ‘UPDATE’, ‘SET’ and ‘WHERE’
UPDATE TableName
SET field1=value,
field2=value…
WHERE fieldX=value
Example
• Using
the PetsAndOwners database:
• We
can change the surname of the person called John Smith to Jones:
UPDATE
tblOwners
SET LName =
'Jones'
WHERE FName =
'John' AND LName = 'Smith';
Information
- Description
- GCSE Computer Science (Databases) Note on SQL- Edit, created by Caitlin Bergan-Gander on 22/02/2016.
- Created by
- Caitlin Bergan-Gander
- Views
- 0
- Rating