r,
Thursday, May 30, 2002, 12:35:58 PM, you wrote:

r>  in a timestamp field, do I have to provide the values?

r>  eg
r>  create table ryan(t_imestamp timestamp(8), name varchar(30));

r>  how do I insert? do I have to specify the value? if so how do I get the
r>  value to specify it?
r>  The manual has just confused me more.

You can insert into the timestamp field current time or specific
value. If you want to insert current date and time you set the column
to NULL or to NOW(), f.e.:
   INSERT INTO ryan VALUES (NULL,'some string');
or
   INSERT INTO ryan VALUES (NOW(),'some string');

You can also insert into column certain value:
   INSERT INTO ryan VALUES ('20020417','some string');

Note: Timestamp(8) means that only 8 digits will be displayed, not
stored! So, if you have 2 values f.e. '20020417000000' and
'20020417000001' they will be both shows as '20020417' but they are
not the same.

r>  Cheers,
r>  -Ryan




-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [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