Help SQL Query

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
 
T

tina

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top