-
efficient update program
Hi Friends,
I have a table emp with columns (hiredate date, birthdate date);
I want to update the two columns set to NULL if their value is
greater than sysdate. Like this:
sql> update emp set hiredate=null where hiredate>sysdate;
sql> update emp set birthdate=null where birthdate>sysdate;
How can i write this on one command line (maybe using decode)
so i wont re-read the table again, thus making it efficient.
I want one pass to the table.
Thanks a lot
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|