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:
>
>autos
>
>columns:
>
>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
>
>
>CREATE TABLE autos (
>year ??? (4),
>make VARCHAR (20),
>model VARCHAR (20),
>price ????? (10),
>pictur_name VARCHAR (25),
>);
>
>is that correct?
>
>Regards,
>
>W. J. Samplonius
>e n d u r a d e z i n e
>info@stripped
>www.endura.co.nz
--
Paul DuBois, paul@stripped