On Monday 05 July 2004 12:54 pm, Ying Lu wrote: > Hello all, > > I have a datatype question. > > When there is column named ID, users are able to > give it either char(11) or int(11). > > Please advise, which type is better such as more > secure, save space, etc? Or it dose not matter at > all?
It depends on what values you are going to assign to this column. The usual case is to use int and to use auto increment to assign a serial number to it when the row is inserted. int(11) saves space over char(11) because it is stored as a binary value in four bytes vs. 11 bytes for char(11). > > Kind regards, > Ying -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]