Why is the GETDATE() an invalid identifier says Oracle Sql Developer tool when I debug this code:
CREATE OR REPLACE TRIGGER SPName
AFTER UPDATE
ON TableName
SYSDATE
and GETDATE
perform identically.
SYSDATE
is compatible with Oracle syntax, and GETDATE
is compatible with Microsoft SQL Server syntax.
Use ORACLE equivalent of getdate()
which is sysdate
. Read about here.
Getdate() belongs to SQL Server , will not work on Oracle.
Other option is current_date
getdate()
for MS-SQL, sysdate
for Oracle server
I think you want SYSDATE
, not GETDATE()
. Try it:
UPDATE TableName SET LastModifiedDate = (SELECT SYSDATE FROM DUAL);