How to find out column with NULL values allowed in the insert in whole database ?
+6
A:
I don't have sql at hand, but the query goes something like this
SELECT * FROM information_schema.columns WHERE is_nullable = 'YES'
In general, search for this stardard view, for all the metadata info about your schema and structure of the database; there are many others (information_schema.tables, information_schema.constraints, etc)
Jhonny D. Cano -Leftware-
2009-07-11 11:21:05
Probably should be is_nullable = 'YES' (caps) to avoid issues if your database is set to be case sensitive.
Rob Levine
2009-07-11 11:28:13
The first one is the right one.
Juanma
2009-07-11 11:30:18
Thanks... i've just edited it
Jhonny D. Cano -Leftware-
2009-07-11 12:07:08