Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2005
    Posts
    4

    Unanswered: Default value in datetime column

    Does anyone know the create table syntax to create a timestamp column that defaults to curtime(). This is to provide an audit trail for table inserts?

    Thanks,

    DG

  2. #2
    Join Date
    May 2005
    Posts
    127
    hi,
    the default value for timestamp column is current date and you do not need to set a default value for it. see The DATETIME, DATE, and TIMESTAMP Types
    to create a table with timestamp column:
    Code:
    create table test (fieldName TIMESTAMP);
    for more info see create table

    --Regards
    Chagh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •