No, it's not accepting NULL if it was declared as NOT NULL.
It's just accepting an empty sting ( "" ).
CREATE TABLE test (t VARCHAR(10) NOT NULL);
INSERT INTO test SET t = NULL;
INSERT INTO test SET t = '';
First insert will tell you what you're waiting for. And the second one
will do what you're asking for.
Empty string is not NULL.
sreedhar wrote:
s: Date: Wed, 12 Dec 2001 19:12:41 +0530
s: From: sreedhar <[EMAIL PROTECTED]>
s: To: mysql <[EMAIL PROTECTED]>
s: Subject: NOT NULL field accepting NULL
s:
s: Hi All,
s:
s: In MySQL, Even i declared a field as NOT NULL it is accepting nulls .What
s: might be the
s: problem. please let me know.
s:
s: regards,
s: sreedhar
s:
s:
s: ---------------------------------------------------------------------
s: Before posting, please check:
s: http://www.mysql.com/manual.php (the manual)
s: http://lists.mysql.com/ (the list archive)
s:
s: To request this thread, e-mail <[EMAIL PROTECTED]>
s: To unsubscribe, e-mail <[EMAIL PROTECTED]>
s: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
s:
--
Sherzod Ruzmetov <[EMAIL PROTECTED]>
http://www.UltraCgis.com, Consultant
989.774.6265
+----------------------------------------+
| There is nothing wrong with your tools.|
| But we can make a better one. |
+----------------------------------------+
---------------------------------------------------------------------
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