SELECT *
FROM [dbo].[drugTP]
WHERE [DrugRate] IS NULL
When I run this query, SQL Server returns an empty grid, why?
SELECT *
FROM [dbo].[drugTP]
WHERE [DrugRate] IS NULL
When I run this query, SQL Server returns an empty grid, why?
Probably the value in the column is not a "NULL" value but an empty string.
You can try matching the empty string
SELECT *
FROM [dbo].[drugTP]
WHERE [DrugRate] IS NULL or [DrugRate] = ''
or using the function NULLIF, that returns NULL if the two parameters are equal
SELECT *
FROM [dbo].[drugTP]
WHERE NULLIF([DrugRate],'') IS NULL