DH
Programmer
- Dec 8, 2000
- 168
As an example, lets say I have the follwing exampleTable with 2 columns and data like so:
userId expirationDate
--------- --------------
8 6/05/2006
24 6/15/2006
30 6/22/2006
I would like to use the following WHERE clause to grab certain rows of data:
SELECT expirationDate
FROM exampleTable
WHERE userId IN (8,30)
How can I loop throught the results to UPDATE the expirationDate by 1 month for rows that match the WHERE clause?
I haven't used loops very much in SQL so thanks in advance for your help.
DH
userId expirationDate
--------- --------------
8 6/05/2006
24 6/15/2006
30 6/22/2006
I would like to use the following WHERE clause to grab certain rows of data:
SELECT expirationDate
FROM exampleTable
WHERE userId IN (8,30)
How can I loop throught the results to UPDATE the expirationDate by 1 month for rows that match the WHERE clause?
I haven't used loops very much in SQL so thanks in advance for your help.
DH