Link to home
Start Free TrialLog in
Avatar of SimonPrice33
SimonPrice33

asked on

search SQL table for null in each column

Hi Experts,

is there an easy(ish) way to run a select statment to run across each colum to see if there are null values?

thanks

Simon
ASKER CERTIFIED SOLUTION
Avatar of edtechdba
edtechdba
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Guy Hengel [angelIII / a3]
do you mean NULL in all columns for a single row?
I agree there is nothing "simple", the only way is the one above, as you have to consider that for columns that cannot be null there will be some "default" value (at least).
you might want to consider such "default values" to be like a NULL value for your consideration...
Avatar of SimonPrice33
SimonPrice33

ASKER

Im not checking to see if they are nullable, i was hoping that i wouldnt have to specify each column but thought that would be the only way.

thanks

simon
If there are columns that are not nullable in your table, then you'll reduce the # of columns when searching for NULL values if you run first query before checking for NULL values.

Just a thought. Thank you.
the genuis who put this together made all fields nullable...
sorry, you will have to bite the nail here...