MySQL Forums
Forum List  »  Knowledge Base

insert problem with not null columns
Posted by: Mazen Elsayed
Date: October 03, 2009 02:57AM

Dear Friends;

I am new to mysql, and I created a table named "test", with 3 columns (id"PK", firstName, lastName), all of them not null.

the problem comes when I execute the following sql statement;

INSERT INTO test (id,firstName) VALUES (4,'steven');

the record will be accepted, and there is no value in the column "lastName", even I put that as not null. How can the mySQL can accept this query, what is the value that inserted into "lastName" columns ??

regards
Mazen Elsayed

Options: ReplyQuote


Subject
Views
Written By
Posted
insert problem with not null columns
3072
October 03, 2009 02:57AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.