[thelist] Query help?

rudy r937 at interlog.com
Sun Feb 23 11:56:00 CST 2003


> i love watching rudy fix this stuff, it's the closest thing we have
> to poetry on this list...

you honour me, sir

by the way, the frisbee golf game is set for saturday night, march 15


andrew and i are doing this offlist because frankly, i did not expect him to
be overjoyed at having my comments about his table visible to several
thousand people, nor did i expect others to enjoy having to hit Delete on
these posts all day...

for example, he had

  Category varchar(100)  DEFAULT '' NOT NULL ,
  CategoryID bigint(20)  DEFAULT '' NOT NULL auto_increment,

and my comments were --

don't use DEFAULT '' on the category name because trust me, you do not want
to have a valid, non-null value that's an empty string

don't use DEFAULT '' on a numeric column because it just plain don't make
sense

don't use any DEFAULT on an AUTO_INCREMENT

don't use BIGINT unless you plan to have more than 2,147,483,647 categories

don't use INTEGER unless you plan to have more than 32,767

don't use TINYINT because that only goes to 127 and you may reach that limit

therefore, use SMALLINT

also, don't put the number in brackets behind an integer column, it is
useless, despite what the mysql manual may lead you to believe



rudy




More information about the thelist mailing list