List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:July 27 1999 11:46am
Subject:Re: datatypes?
View as plain text  
At 1:01 AM -0500 7/27/99, W. J. Samplonius wrote:
>I need assistance creating a simple table... I know how to make the table
>but I am not too sure what datatypes to use.
>table name:
>year ---- 4 numbers

There is a YEAR data type.  If your range of values lies within 1901 - 2155
it might be what you want.

>make ------- 20 characters
>model -------- 20 char
>price ------ special characters and numbers $10,000.00

What do you mean by "special characters"?  Just the dollar sign?
Or something else?  If you really need to have non-digit characters
in the field, you'll need to use CHAR or VARCHAR.  If the dollar
sign is only implied, you could use a floating-point field.  You
could also use an integer field; store prices as number of cents
and convert to two-decimal form as necessary.  But that can be
a hassle.

>picture_name ----- image filename
>so I would do somthing like this
>year ??? (4),
>make VARCHAR (20),
>model VARCHAR (20),
>price ????? (10),
>pictur_name VARCHAR (25),
>is that correct?
>W. J. Samplonius
>e n d u r a d e z i n e

Paul DuBois, paul@stripped
datatypes?W. J. Samplonius27 Jul
  • Re: datatypes?Martin Ramsch27 Jul
  • Re: datatypes?Paul DuBois27 Jul
RE: datatypes?Andreas Löding27 Jul