Hello All
What are the affects of making a column in a mysql table as NULL or NOT NULL.
What should be the default.
Any help is greatly appreciated..
Thanks
IM
Hello All
What are the affects of making a column in a mysql table as NULL or NOT NULL.
What should be the default.
Any help is greatly appreciated..
Thanks
IM
Mysql says that if you have a non-NULL column then an insert statement might generate errors if that column is left blank.
Personally I've never had any problems with that even if it is set to non-NULL. Mysql does i think default to it being non-NULL.
Mark
thanks for the reply.
Is it the sam case with all the data types like, varchar, int
Again, i've have no difficulty with submitting empty values to non-NULL field / colums. If you want I can post up the mysql manual for you - it's a rivetting read if you're an insomniac
Mark
Thanks a lot,
that would be very helpful....
Ok, it doesn't seem to want to upload, so i'll email it to you - it's 3Mb though - is that a problem??
If anyone else wants it just mail me.
Mark
OK, can't email to you either, cos you don't want to receive them.
you can find a copy at:
http://www.mysql.com/downloads/download.php?file=Downloads/Manual/manual.pdf-2002-07-26.zip
Mark
Re buttle on what I said earlier:
Your question got me thinking and so i did a little research. there is a difference between NULL and an empty string "" which is what i was considering to be a null value. If you try inserting NULL into a field of non-NULL if flans you big style. Doesn't like it.
Sorry if i caused confusion between NULL and an empty string.
Amaterish mistake
Mark