Take the 2-minute tour ×

I was under the impression that argument-less functions can be called with empty parentheses after the function name, i.e. what some other databases allow to do:


Whereas in Oracle, I have to write


With user-defined functions, this rule doesn't apply (in 11g). I can write both


My question is: Is CURRENT_TIMESTAMP really a true function or should I consider it to be a language construct / pseudo-column of the Oracle SQL dialect (compatible with the SQL standard)? Is there any formal definition about when I can (optionally, mandatorily) add the () and when I have to omit them?


  • SQL 1992 defines:

    <current timestamp value function> ::=
      CURRENT_TIMESTAMP [ <left paren> <timestamp precision> <right paren> ]
  • Derby, HSQLDB, Ingres, Postgres, SQLite, SQL Server behave like Oracle, where there are no parentheses allowed for CURRENT_TIMESTAMP

  • Sybase SQL Anywhere knows a CURRENT TIMESTAMP function (without parentheses, without underscore)
  • CUBRID, MySQL, Sybase ASE allow for using CURRENT_TIMESTAMP()
share|improve this question
FWIW select CURRENT_TIMESTAMP() is a syntax error in MSSQL (i.e. only plain CURRENT_TIMESTAMP is acceptable) –  StuartLC Apr 10 '12 at 7:48
@nonnb: Yes, you're right. I'll update the question with some background info –  Lukas Eder Apr 10 '12 at 7:57
add comment

1 Answer

up vote 5 down vote accepted

SQL standards back to 1992 refer to CURRENT_TIMESTAMP as both a "time-varying system variable" and a "datetime value function". See, for example, Database Language SQL.

But AFAIK the standards always use CURRENT_TIMESTAMP, never CURRENT_TIMESTAMP(). Using CURRENT_TIMESTAMP() on a compliant dbms should fail with a syntax error.

I'm not sure what the standards have to say about user-defined functions.

share|improve this answer
time-varying system variable is the term I was looking for. Great, thanks for the hint! –  Lukas Eder Apr 10 '12 at 8:33
add comment

Your Answer


