On Tue, Mar 27, 2001 at 11:53:22AM -0000, Ramasamy Palaniappan wrote:
> Dear Sir,
>
> I have created the following table:
>
> create table test(name varchar(10) NOT NULL);
>
> query is ok
>
> I HAVE TRIED THE FOLLOWING QUERY :
>
> insert into test values("");
>
> MYSQL COMMAND IS ACCEPTING THE ABOVE QUERY WHICH VIOLATES NOT NULL
> CONSTRAINTS.
>
No it doesn't violate the NOT NULL constraint. There is a
difference between NULL and an empty string. You're just
telling MySQL that it shouldn't accept this:
insert into test values(NULL);
Regards,
Fred.
--
Fred van Engen XO Communications B.V.
email: [EMAIL PROTECTED] Televisieweg 2
tel: +31 36 5462400 1322 AC Almere
fax: +31 36 5462424 The Netherlands
---------------------------------------------------------------------
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