0

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

2 Answers2

2

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

Ed Leighton-Dick
  • 1,094
  • 1
  • 7
  • 12
0

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.

Justin Scott
  • 8,798
  • 1
  • 28
  • 39