Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

is there a SQL statement that would show any null value in any record? For example if I had a table Alpha with Column A, B, and C where C was null in one record, and B was null in another, and A in another. Could I select only the rows that contain any null value without an OR statement: i.e WHERE A is Null OR B is Null OR C is Null. Could have something similiar to:

Select * From Alpha Where * Is null

I am using a SQL DB, and an Access DB

share|improve this question

Nothing like that exists in SQL Server. You'd have to list each column using the OR syntax.

share|improve this answer

I suppose in theory you could write a stored procedure which could dynamically construct a query which included an OR statement for each of the columns in a given table and then return the results without having to know what the column names are in advance. You would need access to the system tables to do that, however, as well as access to execute stored procedures.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.