Help SQL Query

  • Thread starter Thread starter Lokesh
  • Start date Start date
L

Lokesh

Can anyone help in writing a query to update certain records.
the query below updates the Address and City with Nissestien and Sandnes
but i want wanted a query which updates P_ID 1, 3 and 5 with Address =
Storgt 20 and City =Stavanger

Can Someone help in writing a query.

UPDATE Persons
SET Address='Nissestien 67', City='Sandnes'

P_Id LastName FirstName Address City
1 Hansen Ola Nissestien 67
Sandnes
2 Svendson Tove Nissestien 67 Sandnes
3 Pettersen Kari Nissestien 67 Sandnes
4 Nilsen Johan Nissestien 67 Sandnes
5 Tjessem Jakob Nissestien 67 Sandnes
 
start by creating an ordinary SELECT query, and set criteria to pull the
records you need. once the query is pulling the correct records, change it
to an Update query.

hth
 
Back
Top