Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Store Sysdate in a variable

AntillesAug 1 2008 — edited Aug 4 2008
Hi

I'm trying to store the value of sysdate in a variable so I can use it in a query later.

In SQL Server I'd use the following syntax:

DECLARE @storeddate DATETIME
SELECT @storeddate = GETDATE()
SELECT @storeddate

Result:
2008-08-01 14:47:15.253

How would I do the equivalent in Oracle?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 1 2008
Added on Aug 1 2008
6 comments
20,908 views