How can I insert the system date into a table?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rajeevbu
    New Member
    • Oct 2011
    • 1

    How can I insert the system date into a table?

    How can I use the below query in an INSERT query?

    SELECT to_char(SYSDATE , 'DD/MM/YYYY HH24:MI:SS') FROM DUAL;
    #

    Example:

    INSERT INTO X (
    1,
    12,
    SELECT to_char(SYSDATE , 'DD/MM/YYYY HH24:MI:SS') FROM DUAL;
    )
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    If the target field is of date data type then you can directly user this.

    Code:
    INSERT INTO X (1,12,SYSDATE);

    Comment

    Working...