* Manjeet > create table user (Login_Id varchar(16) NOT NULL, Location varchar(16) NOT > NULL, PRIMARY KEY (Login_ID)); > > The above table should not take any null values. > I tryed inserting some null values eg: > > INSERT INTO user (Login_Id,Location) values ("",""); > > According to me this statement should give error and not work.
NULL is a special value, it is not the same as "" or 0. > But still it inserts null values in to the table. > When the same insert statement is run again, it gives error 1062. Login_Id is the primary key, you can not have two rows with the same value in this field. -- Roger --------------------------------------------------------------------- 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