MSSQL Select Not Null

I mainly use MySQL these days, so get screwed over for a few minutes when I have to do something in MSSQL that is slightly different when it comes to it’s custom syntax.

If you want to show all entries in a specific column and where it is not Null then you can do the following:

SELECT [columnNameHere]
FROM [databaseNameHere].[dbo].[databaseTableNameHere]
WHERE [columnNameHere] IS NOT NULL

One thought on “MSSQL Select Not Null

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>