SYSDATE Function - Oracle to MySQL Migration

Oracle SYSDATE function returns the current date and time. In MySQL you can use SYSDATE() function (parentheses are required) that also includes the time.

Oracle:

  ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MI:SS';
 
  -- Get the current date and time
  SELECT SYSDATE FROM dual;
  # 2024-10-11 16:23:13

MySQL:

  -- Get the current date and time
  SELECT SYSDATE();
  # 2024-10-11 16:23:13

For more information, see Oracle to MySQL Migration.