On Thursday 16 January 2003 11:00, Kwok Siang wrote: > OS: win XP > mysql : 3.23.54-max > > can someone help me with this unexplainable question. > > i create this in the mysql database, > > CREATE TABLE `foo` ( > `num` int(4) unsigned zerofill NOT NULL default > '0000' > ) TYPE=MyISAM; > > after that, i tried to insert a blank data into it, > > INSERT INTO foo set num=''; > *(there's nothing between the quotes) > > In the database it display 4 zeros which is 0000, but > when i perform a search of an empty string like this, > > SELECT * FROM foo WHERE num=''; > > The result was 0000, by right it will hav an empty > set. > How could this happen? Please help
'num' has INT(4) UNSIGNED column type. Empty string is not a correct value for INT column type. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php