NOW

 

The function NOW returns the current date and time. The precision is 1 millisecond.

SQL Syntax:
 
   NOW()
Escape Syntax:
 
  {fn NOW()}
Return Type:
 
  TIMESTAMP
Alternative Names:   GETDATE: This is the equivalent from the MS SQL Server.

Examples:

  • SELECT now()
  • SELECT {fn now()}, * FROM mytable
  • SELECT * FROM mytable WHERE start < now()
  • CREATE TABLE abc(
      name varchar(30),
      start timestamp default now()
    )

see also:
SQL Date Time Functions


100% pure Java DBMS
Mirror Site