views:

88

answers:

1

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-
Probably should be is_nullable = 'YES' (caps) to avoid issues if your database is set to be case sensitive.
Rob Levine
The first one is the right one.
Juanma
Thanks... i've just edited it
Jhonny D. Cano -Leftware-