ADS

Featured

Query NULL records in SQL Server

Hardly to be found on google (with several scripts with more than 10 or 20 lines), I found a method that is so simple, but I really needed it today in my service.
Developing a system to capture all the photos in the system that do not have a linked client, where the field is equal to the NULL value, I performed the following query on SQL Server to get the fields where the photos do not have a client:


select * from album_fotos where client_id is null

So in this way, only results without data will be returned.

No comments