On Fri, 11 Jan 2002 15:02:00 -0800 Jerry Leonard "Jerry Leonard" <[EMAIL PROTECTED]> wrote:
> Hi, > > I am really new to MySQL and am wondering this: > > I understand how to make a database and tables but what I don't > understand > is when to make a row an "int" with auto_increment or just a plain > "int". > Or why would you use varchar(50) instead of char(50). > > Could someone please explain what is happening and why? > > Thank you > Jerry 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 50 characters. -- Raquel ============================================================ Nothing happens in consequence to nature, only in consequence to what we know of it. --Scully, "X-Files" -- 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]