Reputation: 555
I have a table with these 2 columns : date and day date has dates and day is empty I would like to do something like this :
UPDATE table SET day='day(date)'
the idea is to take the date (its in date time format) and take out the day and insert it into the day column. any ideas ?
Upvotes: 0
Views: 708
Reputation: 745
Hope this will help
UPDATE table SET day = EXTRACT(DAY FROM date)
Upvotes: 1