Oracle uses SYSDATE, and there's the ANSI standard CURRENT_TIMESTAMP (supported by both SQL Server and Oracle, besides others) to get the current date & time.
v_today DATE;
SELECT SYSDATE
INTO v_today
FROM DUAL;
...would be the equivalent to the TSQL you posted. Oracle uses the INTO clause for populating variables, where the variable data type must match the column position in the SELECT clause.
Oracle uses
SYSDATE
, and there's the ANSI standardCURRENT_TIMESTAMP
(supported by both SQL Server and Oracle, besides others) to get the current date & time....would be the equivalent to the TSQL you posted. Oracle uses the
INTO
clause for populating variables, where the variable data type must match the column position in the SELECT clause.While not a strict translation, I prefer the following construction in Oracle:
Or even: