List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:November 14 2002 5:26pm
Subject:Re: INSERT INTO ... SELECT question
View as plain text  
At 11:15 -0600 11/14/02, Greg Macek wrote:
>Thanks for the tip! Looks like I can change my date_archived field to
>timestamp(8), since all I care about for this is the date information
>(actual time is useless to me). My sql query all of a sudden got a lot
>simpler. Thanks again for the help!

TIMESTAMP values are always stored to the full 14 digits.  The 8
affects display only, though that appears to be exactly what you want.

>
>
>On Thu, 2002-11-14 at 11:07, Matthew Baranowski wrote:
>>  Hey Greg:
>>
>>  A slightly easier way to do this is to use a "timestamp" field. Timestamp is
>>  just a standard mysql data type. When a record is added, it records the
>>  current time. When a record is updated, the timestamp field will be set to
>>  the time of the update.
>>
>>  http://www.mysql.com/doc/en/DATETIME.html
>>  The TIMESTAMP column type provides a type that you can use to automatically
>>  mark INSERT or UPDATE operations with the current date and time. If you have
>>  multiple TIMESTAMP columns, only the first one is updated automatically.
>>
>>  Thanks,
>>
>>  Matt
>>
>>  Matthew P Baranowski
>>  Data Manager, Office of Educational Assessment
>  > University of Washington

Thread
INSERT INTO ... SELECT questionGreg Macek14 Nov
  • Re: INSERT INTO ... SELECT questionMatthew Baranowski14 Nov
    • Re: INSERT INTO ... SELECT questionGreg Macek14 Nov
      • Re: INSERT INTO ... SELECT questionPaul DuBois14 Nov
Re: INSERT INTO ... SELECT questionGreg Macek14 Nov