Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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

 
discard

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