{"id":70,"date":"2026-03-06T06:16:20","date_gmt":"2026-03-06T06:16:20","guid":{"rendered":"https:\/\/gigz.pk\/sql\/?post_type=lesson&#038;p=70"},"modified":"2026-03-16T18:49:25","modified_gmt":"2026-03-16T18:49:25","slug":"is-null","status":"publish","type":"lesson","link":"https:\/\/gigz.pk\/sql\/lesson\/is-null\/","title":{"rendered":"\u00a0IS NULL"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">What is <code>IS NULL<\/code>?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In SQL, <code>IS NULL<\/code> is used to <strong>check whether a column has a NULL value<\/strong>. A NULL represents <strong>missing or unknown data<\/strong>, not zero or an empty string.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. Syntax<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">SELECT column1, column2<br>FROM table_name<br>WHERE column_name IS NULL;<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>column_name<\/code> \u2013 The column you want to check for NULL values.<\/li>\n\n\n\n<li><code>table_name<\/code> \u2013 The table containing the column.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">3. Example<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Suppose you have a table called <strong>Employees<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>EmployeeID<\/th><th>Name<\/th><th>Department<\/th><\/tr><\/thead><tbody><tr><td>1<\/td><td>Alice<\/td><td>HR<\/td><\/tr><tr><td>2<\/td><td>Bob<\/td><td>NULL<\/td><\/tr><tr><td>3<\/td><td>Charlie<\/td><td>IT<\/td><\/tr><tr><td>4<\/td><td>David<\/td><td>NULL<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To find all employees <strong>without a department<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">SELECT Name<br>FROM Employees<br>WHERE Department IS NULL;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Result:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Name<\/th><\/tr><\/thead><tbody><tr><td>Bob<\/td><\/tr><tr><td>David<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">4. Using <code>IS NOT NULL<\/code><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To find rows where a column <strong>does have a value<\/strong>, use <code>IS NOT NULL<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">SELECT Name<br>FROM Employees<br>WHERE Department IS NOT NULL;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Result:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Name<\/th><\/tr><\/thead><tbody><tr><td>Alice<\/td><\/tr><tr><td>Charlie<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">5. Key Points<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>IS NULL<\/code> is used for <strong>filtering missing data<\/strong>.<\/li>\n\n\n\n<li><code>NULL<\/code> is <strong>not the same as zero or empty string<\/strong>.<\/li>\n\n\n\n<li>Always use <code>IS NULL<\/code> or <code>IS NOT NULL<\/code> \u2013 <strong>do not use <code>=<\/code> or <code>!=<\/code><\/strong> with NULL.<\/li>\n<\/ul>\n\n\n<div class=\"yoast-breadcrumbs\"><span><span><a href=\"https:\/\/gigz.pk\/sql\/\">Home<\/a><\/span> \u00bb <span class=\"breadcrumb_last\" aria-current=\"page\">SQL Foundations Program (SQL-101) > Filtering &#038; Conditions > IS NULL<\/span><\/span><\/div>\n\n\n<div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1773512190144\"><strong class=\"schema-faq-question\"><\/strong> <p class=\"schema-faq-answer\"><\/p> <\/div> <\/div>\n","protected":false},"menu_order":18,"template":"","class_list":["post-70","lesson","type-lesson","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u00a0IS NULL - SQL Learning Hub<\/title>\n<meta name=\"description\" content=\"&quot;Learn SQL IS NULL and IS NOT NULL queries to filter missing or existing data in tables with practical examples\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gigz.pk\/sql\/lesson\/is-null\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u00a0IS NULL - SQL Learning Hub\" \/>\n<meta property=\"og:description\" content=\"&quot;Learn SQL IS NULL and IS NOT NULL queries to filter missing or existing data in tables with practical examples\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gigz.pk\/sql\/lesson\/is-null\/\" \/>\n<meta property=\"og:site_name\" content=\"SQL Learning Hub\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-16T18:49:25+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":[\"WebPage\",\"FAQPage\"],\"@id\":\"https:\\\/\\\/gigz.pk\\\/sql\\\/lesson\\\/is-null\\\/\",\"url\":\"https:\\\/\\\/gigz.pk\\\/sql\\\/lesson\\\/is-null\\\/\",\"name\":\"\u00a0IS NULL - SQL Learning Hub\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gigz.pk\\\/sql\\\/#website\"},\"datePublished\":\"2026-03-06T06:16:20+00:00\",\"dateModified\":\"2026-03-16T18:49:25+00:00\",\"description\":\"\\\"Learn SQL IS NULL and IS NOT NULL queries to filter missing or existing data in tables with practical examples\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gigz.pk\\\/sql\\\/lesson\\\/is-null\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gigz.pk\\\/sql\\\/lesson\\\/is-null\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/gigz.pk\\\/sql\\\/lesson\\\/is-null\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/gigz.pk\\\/sql\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Foundations Program (SQL-101) > Filtering & Conditions > IS NULL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gigz.pk\\\/sql\\\/#website\",\"url\":\"https:\\\/\\\/gigz.pk\\\/sql\\\/\",\"name\":\"SQL Learning Hub\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gigz.pk\\\/sql\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u00a0IS NULL - SQL Learning Hub","description":"\"Learn SQL IS NULL and IS NOT NULL queries to filter missing or existing data in tables with practical examples","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gigz.pk\/sql\/lesson\/is-null\/","og_locale":"en_US","og_type":"article","og_title":"\u00a0IS NULL - SQL Learning Hub","og_description":"\"Learn SQL IS NULL and IS NOT NULL queries to filter missing or existing data in tables with practical examples","og_url":"https:\/\/gigz.pk\/sql\/lesson\/is-null\/","og_site_name":"SQL Learning Hub","article_modified_time":"2026-03-16T18:49:25+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["WebPage","FAQPage"],"@id":"https:\/\/gigz.pk\/sql\/lesson\/is-null\/","url":"https:\/\/gigz.pk\/sql\/lesson\/is-null\/","name":"\u00a0IS NULL - SQL Learning Hub","isPartOf":{"@id":"https:\/\/gigz.pk\/sql\/#website"},"datePublished":"2026-03-06T06:16:20+00:00","dateModified":"2026-03-16T18:49:25+00:00","description":"\"Learn SQL IS NULL and IS NOT NULL queries to filter missing or existing data in tables with practical examples","breadcrumb":{"@id":"https:\/\/gigz.pk\/sql\/lesson\/is-null\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gigz.pk\/sql\/lesson\/is-null\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/gigz.pk\/sql\/lesson\/is-null\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gigz.pk\/sql\/"},{"@type":"ListItem","position":2,"name":"SQL Foundations Program (SQL-101) > Filtering & Conditions > IS NULL"}]},{"@type":"WebSite","@id":"https:\/\/gigz.pk\/sql\/#website","url":"https:\/\/gigz.pk\/sql\/","name":"SQL Learning Hub","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gigz.pk\/sql\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/gigz.pk\/sql\/wp-json\/wp\/v2\/lesson\/70","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gigz.pk\/sql\/wp-json\/wp\/v2\/lesson"}],"about":[{"href":"https:\/\/gigz.pk\/sql\/wp-json\/wp\/v2\/types\/lesson"}],"wp:attachment":[{"href":"https:\/\/gigz.pk\/sql\/wp-json\/wp\/v2\/media?parent=70"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}