question about datetime column in mysql

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • nephish

    #1

    question about datetime column in mysql

    Hey there,
    i tried this question in the mysql group, but have not heard anything.
    i have a database with about 20 tables. The some of these tables have
    datetime type columns in them. What i am basically wondering is if
    there is a way to make a default value of now() apply if it is not
    specified when the row is created.
    i know this is possible with a timestamp, but is it possible with a
    datetime column ? and if so, how ?

  • Jerry Stuckle

    #2
    Re: question about datetime column in mysql

    nephish wrote:
    Hey there,
    i tried this question in the mysql group, but have not heard anything.
    i have a database with about 20 tables. The some of these tables have
    datetime type columns in them. What i am basically wondering is if
    there is a way to make a default value of now() apply if it is not
    specified when the row is created.
    i know this is possible with a timestamp, but is it possible with a
    datetime column ? and if so, how ?
    >
    Re-ask your question in that newsgroup - it might have gotten lost the
    first time (did you wait at least 24 hours for a response?). Or try
    another mysql newsgroup - such as comp.databases. mysql - or the mailing
    list on mysql.com.

    A php newsgroup is not the correct place for MySQL questions.

    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    • nephish

      #3
      Re: question about datetime column in mysql

      ok, sorry for that.
      shawn

      On Oct 28, 10:42 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
      nephish wrote:
      Hey there,
      i tried this question in the mysql group, but have not heard anything.
      i have a database with about 20 tables. The some of these tables have
      datetime type columns in them. What i am basically wondering is if
      there is a way to make a default value of now() apply if it is not
      specified when the row is created.
      i know this is possible with a timestamp, but is it possible with a
      datetime column ? and if so, how ?Re-ask your question in that newsgroup - it might have gotten lost the
      first time (did you wait at least 24 hours for a response?). Or try
      another mysql newsgroup - such as comp.databases. mysql - or the mailing
      list on mysql.com.
      >
      A php newsgroup is not the correct place for MySQL questions.
      >
      --
      =============== ===
      Remove the "x" from my email address
      Jerry Stuckle
      JDS Computer Training Corp.
      jstuck...@attgl obal.net
      =============== ===

      Comment

      Working...