On Fri, 11 Jan 2002 15:02:00 -0800
Jerry Leonard "Jerry Leonard" <[EMAIL PROTECTED]> wrote:
> I am really new to MySQL and am wondering this:
> I understand how to make a database and tables but what I don't
> is when to make a row an "int" with auto_increment or just a plain
> Or why would you use varchar(50) instead of char(50).
> Could someone please explain what is happening and why?
> Thank you
Personally I would never create a row that was "'int' with
auto_increment". However, I often create columns that are. When I
do, I use those columns as unique identifiers for a particular row.
Any of the other data may change in the row, but the unique
identifier will always remain the same. The price of an item may
change, as well as the packing quantity, the description and even
your part number scheme, but the unique ID always remains the same.
I use 'varchar(50)' when my data is of variable length because the
storage space automagically grows up to 50 characters, thus using
less space. 'char(50)' is just what it says, space enough to hold
Nothing happens in consequence to nature, only in consequence to
what we know of it.
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]