SYSDATE Function - Oracle to MariaDB Migration

Oracle SYSDATE function returns the current date and time. In MariaDB 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

MariaDB:

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

For more information, see Oracle to MariaDB Migration.