chad,
Thursday, June 13, 2002, 4:59:13 PM, you wrote:

ck>      I am sure this is an easy question but I am not thinking clearly for some
ck> reason.  :^)

ck>      If you set a column to auto_Increment.  You do not have to put the 
ck> auto_increment # in the insert statement to get it to be inserted.  Mysql 
ck> does this automatically.

ck>      Is there a way to have the timestamp automatically inserted when an 
ck> insert statement is run?  The timestamp of the insert statement.

If you insert into TIMESTAMP column NULL values, current date and time
will be inserted.

mysql> create table mytime(
    -> mytime timestamp);
Query OK, 0 rows affected (0.01 sec)

mysql> insert into mytime values(NULL);
Query OK, 1 row affected (0.01 sec)

mysql> select * from mytime;
+----------------+
| mytime         |
+----------------+
| 20020613103946 |
+----------------+
1 row in set (0.01 sec)

ck> thanks for the help,
ck> chad





-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to