This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have a table called 'USER', I've just added a new colum (attribute) called regDate (type varchar).
Now all the existing records have regDate set to NULL, what I want to do is change all the NULL values to some date. My query is as follow
UPDATE USER SET regDate = '19/07/2007 1.11pm' WHERE regDate = NULL;
This doesn't unfortunatley update all the NULL columns with the date.
I suspect it's due to me using regDate twice in the query, but I cant see how else I could update all the columns. So my questions, is my query correct? Is there a better way of writing this query so I can update the relevant columns?