1.

Why is SYSDATE and USER keywords used?

Answer»
  • SYSDATE:
    • This keyword returns the CURRENT time and date on the local database server.
    • The syntax is SYSDATE.
    • In order to EXTRACT part of the date, we USE the TO_CHAR function on SYSDATE and specify the format we need.
    • Usage:
      • SELECT SYSDATE FROM dual;
      • SELECT ID, TO_CHAR(SYSDATE, 'yyyy/mm/dd') from InterviewBitEmployeeTable where customer_id < 200;
  • USER:
    • This keyword returns the user id of the current session.
    • Usage:
      • SELECT USER FROM dual;


Discussion

No Comment Found