Why is the GETDATE() an invalid identifier

前端 未结 4 1938
独厮守ぢ
独厮守ぢ 2020-12-10 13:28

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          


        
相关标签:
4条回答
  • 2020-12-10 13:34

    SYSDATE and GETDATE perform identically.

    SYSDATE is compatible with Oracle syntax, and GETDATE is compatible with Microsoft SQL Server syntax.

    0 讨论(0)
  • 2020-12-10 13:45

    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

    0 讨论(0)
  • 2020-12-10 13:53

    getdate() for MS-SQL, sysdate for Oracle server

    0 讨论(0)
  • 2020-12-10 13:55

    I think you want SYSDATE, not GETDATE(). Try it:

    UPDATE TableName SET LastModifiedDate = (SELECT SYSDATE FROM DUAL);
    
    0 讨论(0)
提交回复
热议问题