Re: Help with an UPDATE query please

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > I have (among others) two DATE columns in a table; Booking_Date and
> > Booking_Completion_Date. How can I run a query that updates
> > Booking_Completion_Date to be 2 days after Booking_Date where
> > Booking_Completion_Date is NULL?

UPDATE table SET Booking_Completion_Date = Booking_Date + INTERVAL 2 DAY
WHERE Booking_Completion_Date IS NULL;

---John Holmes...

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux