Hi folks:

I have an InnoDB database, the tables created using MySQL Control Center 0.9.4-beta (winXP pro platform).
Each table has some columns which I have checked as Nulls Allowed.


I am building a pure Java GUI to the database. Got the SQL statements working fine, but have
discovered that I can successfully insert rows into a table without including a value for a column
which should be blocking nulls.


e.g.
Table A
--------
id (PK, auto increment)
name type
ssn ( nulls allowed specified)
==> name and type do not have nulls allowed specified, so I think they should be NOT NULL.
they also have no default specified.


then....
insert into A (id,name,ssn)
values (NULL,"Jane",999999999)

this statement works fine, but I think it should give me an error by saying that I'm trying to
insert a row without providing a value for the type column (which has no default specified).
Looking at the create statement for the tables, MySQL Control Center has supplied defaults
of blanks...can I turn off that "preference" ?


using MySQL 4.0.18


Can anyone provide clarification? thanks... Donna



Reply via email to