I have a table with a column called STREAM_TIME of DATE type.
I'm trying to update all rows for that column to today's date. The database used is oracle.
My query:
update bns_bess_messages SET stream_time=getDate();
Oracle comes back with this error:
SQL Error: ORA-00904: "GETDATE": invalid identifier
00904. 00000 - "%s: invalid identifier"
How can I update STREAM_TIME to today's date?
Thanks
You can do it the following way:
update bns_bess_messages set stream_time = trunc(sysdate);
Or if you want to get the exact time:
update bns_bess_messages set stream_time = sysdate;
To check you can use the following query:
select sysdate from dual;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With