{"id":491,"date":"2009-12-27T12:49:34","date_gmt":"2009-12-27T12:49:34","guid":{"rendered":"http:\/\/www.mysqltutorial.org\/?page_id=491"},"modified":"2023-12-29T06:24:21","modified_gmt":"2023-12-29T13:24:21","slug":"avoid-displaying-null-values-by-mapping-to-other-values","status":"publish","type":"page","link":"https:\/\/www.mysqltutorial.org\/mysql-basics\/avoid-displaying-null-values-by-mapping-to-other-values\/","title":{"rendered":"How To Map NULL Values To Other Meaningful Values"},"content":{"rendered":"\n<p><strong>Summary<\/strong><em>:<\/em> in this tutorial, you will learn how to map <code>NULL<\/code> values to other meaningful values.<\/p>\n\n\n\n<p><a title=\"Edgar F. Codd\" href=\"http:\/\/en.wikipedia.org\/wiki\/Edgar_F._Codd\">Dr.E.F.Codd<\/a>, who is the creator of the relational model for the database, introduced the <code>NULL<\/code> concept in the relational database theory. According to Dr.E.F.Codd, <code>NULL<\/code> means unknown value or missing information.<\/p>\n\n\n\n<p>MySQL also supports <code>NULL<\/code> that represents the concept of missing or inapplicable information.<\/p>\n\n\n\n<p>In the database table, you store data that contains <code>NULL<\/code> values. When you present the data to the users in the form of reports, it doesn&#8217;t make sense to display the <code>NULL <\/code> values.<\/p>\n\n\n\n<p>To make the reports more readable and understandable, you have to display <code>NULL<\/code> values as other values such as unknown, missing, or not available (N\/A). To do this, you can use the <a title=\"MySQL IF Function\" href=\"https:\/\/www.mysqltutorial.org\/mysql-control-flow-functions\/mysql-if-function\/\">IF function<\/a>.<\/p>\n\n\n\n<p>The syntax of  the <a title=\"MySQL IF\" href=\"https:\/\/www.mysqltutorial.org\/mysql-control-flow-functions\/mysql-if-function\/\">IF function<\/a> is as follows:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">IF(exp,exp_result1,exp_result2);<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>If the <code>exp<\/code> evaluates to <code>TRUE<\/code> (When <code>exp &lt;> 0<\/code>  and <code>exp &lt;> NULL<\/code> ), the <code>IF<\/code> function returns the value of the <code>exp_result1<\/code> otherwise, it returns the value of <code>exp_result2<\/code> <em>. <\/em><\/p>\n\n\n\n<p>The returned value of the <code>IF<\/code> function can be a string or a number, depending on the <code>exp_result1<\/code> and <code>exp_result2<\/code> expressions<em>.<\/em><\/p>\n\n\n\n<p>Let&#8217;s practice with some examples to get a better understanding.<\/p>\n\n\n\n<p>We will work with the <code>customers<\/code> table in the <a title=\"MySQL Sample Database\" href=\"https:\/\/www.mysqltutorial.org\/getting-started-with-mysql\/mysql-sample-database\/\">sample database<\/a>.<\/p>\n\n\n\n<p>The following is the partial data in the <code>customers<\/code> table which includes <code>customername<\/code> <code>state<\/code> and <code>country<\/code> :<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SELECT<\/span> \n    customername, state, country\n<span class=\"hljs-keyword\">FROM<\/span>\n    customers\n<span class=\"hljs-keyword\">ORDER<\/span> <span class=\"hljs-keyword\">BY<\/span> country;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><a class=\"sql\" href=\"https:\/\/www.mysqltutorial.org\/tryit\/query\/mysql-mapping-null-values\/#1\" target=\"_blank\" rel=\"noopener noreferrer\">Try It Out<\/a> <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"334\" height=\"198\" src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/MySQL-NULL-values-example.jpg\" alt=\"MySQL NULL values example\" class=\"wp-image-4678\" srcset=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/MySQL-NULL-values-example.jpg 334w, https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/MySQL-NULL-values-example-300x178.jpg 300w\" sizes=\"auto, (max-width: 334px) 100vw, 334px\" \/><\/figure>\n\n\n\n<p>From the result set above, you see that the <em>state <\/em>values are not available for some customers. You can use the <code>IF<\/code> function to display <code>NULL<\/code> value as <code>N\/A<\/code>:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SELECT<\/span> \n    customername, <span class=\"hljs-keyword\">IF<\/span>(state <span class=\"hljs-keyword\">IS<\/span> <span class=\"hljs-literal\">NULL<\/span>, <span class=\"hljs-string\">'N\/A'<\/span>, state) state, country\n<span class=\"hljs-keyword\">FROM<\/span>\n    customers\n<span class=\"hljs-keyword\">ORDER<\/span> <span class=\"hljs-keyword\">BY<\/span> country;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><a class=\"sql\" href=\"https:\/\/www.mysqltutorial.org\/tryit\/query\/mysql-mapping-null-values\/#2\" target=\"_blank\" rel=\"noopener noreferrer\">Try It Out<\/a> <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"335\" height=\"223\" src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/MySQL-NULL-as-NA-value.jpg\" alt=\"MySQL NULL as NA value\" class=\"wp-image-4679\" srcset=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/MySQL-NULL-as-NA-value.jpg 335w, https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/MySQL-NULL-as-NA-value-300x200.jpg 300w\" sizes=\"auto, (max-width: 335px) 100vw, 335px\" \/><\/figure>\n\n\n\n<p>Besides the IF function, MySQL provides the <a title=\"MySQL IFNULL\" href=\"https:\/\/www.mysqltutorial.org\/mysql-control-flow-functions\/mysql-ifnull\/\">IFNULL<em> <\/em><\/a>function that allows you to handle <code>NULL<\/code> values directly. The following is the syntax of the <code>IFNULL<\/code> function:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">IFNULL(exp,exp_result);<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><a class=\"sql\" href=\"https:\/\/www.mysqltutorial.org\/tryit\/query\/mysql-mapping-null-values\/#3\" target=\"_blank\" rel=\"noopener noreferrer\">Try It Out<\/a> <\/p>\n\n\n\n<p>The <code>IFNULL<\/code> function returns the value of the <code>exp_result<\/code> expression if the <code>exp<\/code> evaluates to a <code>NULL<\/code> value, otherwise, it returns the value of the <code>exp<\/code> expression.<\/p>\n\n\n\n<p>The following query uses the <code>IFNULL<\/code> function to display <code>NULL<\/code> as unknown as follows:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SELECT<\/span> customername, \n       <span class=\"hljs-keyword\">IFNULL<\/span>(state,<span class=\"hljs-string\">\"N\/A\"<\/span>) state, \n       country\n<span class=\"hljs-keyword\">FROM<\/span> customers\n<span class=\"hljs-keyword\">ORDER<\/span> <span class=\"hljs-keyword\">BY<\/span> country;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><a class=\"sql\" href=\"https:\/\/www.mysqltutorial.org\/tryit\/query\/mysql-mapping-null-values\/#4\" target=\"_blank\" rel=\"noopener noreferrer\">Try It Out<\/a> <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"333\" height=\"223\" src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/MySQL-NULL-with-IFNULL-function.jpg\" alt=\"MySQL NULL with IFNULL function\" class=\"wp-image-4680\" srcset=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/MySQL-NULL-with-IFNULL-function.jpg 333w, https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/MySQL-NULL-with-IFNULL-function-300x201.jpg 300w\" sizes=\"auto, (max-width: 333px) 100vw, 333px\" \/><\/figure>\n\n\n\n<p>In this tutorial, you have learned how to use the <code>IF<\/code>  and <code>IFNULL<\/code> functions to map the NULL values onto other more meaningful values for presenting data in a readable manner.<\/p>\n<div class=\"helpful-block-content\" data-title=\"\">\n\t<header>\n\t\t<div class=\"wth-question\">Was this tutorial helpful? <\/div>\n\t\t<div class=\"wth-thumbs\">\n\t\t\t<button\n\t\t\t\tdata-post=\"491\"\n\t\t\t\tdata-post-url=\"https:\/\/www.mysqltutorial.org\/mysql-basics\/avoid-displaying-null-values-by-mapping-to-other-values\/\"\n\t\t\t\tdata-post-title=\"How To Map NULL Values To Other Meaningful Values\"\n\t\t\t\tdata-response=\"1\"\n\t\t\t\tclass=\"wth-btn-rounded wth-yes-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\tclass=\"feather feather-thumbs-up block w-full h-full\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> Yes <\/span>\n\t\t\t<\/button>\n\n\t\t\t<button\n\t\t\t\tdata-response=\"0\"\n\t\t\t\tdata-post=\"491\"\n\t\t\t\tdata-post-url=\"https:\/\/www.mysqltutorial.org\/mysql-basics\/avoid-displaying-null-values-by-mapping-to-other-values\/\"\n\t\t\t\tdata-post-title=\"How To Map NULL Values To Other Meaningful Values\"\n\t\t\t\tclass=\"wth-btn-rounded wth-no-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> No <\/span>\n\t\t\t<\/button>\n\t\t<\/div>\n\t<\/header>\n\n\t<div class=\"wth-form hidden\">\n\t\t<div class=\"wth-form-wrapper\">\n\t\t\t<div class=\"wth-title\"><\/div>\n\t\t\t\n\t\t\t<textarea class=\"wth-message\"><\/textarea>\n\n\t\t\t<button class=\"btn btn-primary wth-btn-submit\">Send<\/button>\n\t\t\t<button class=\"btn wth-btn-cancel\">Cancel<\/button>\n\t\t\n\t\t<\/div>\n\t<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>You will learn how to map NULL values onto other values for a better data representation.<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":174,"menu_order":101,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-491","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Mapping NULL Values onto Other Values<\/title>\n<meta name=\"description\" content=\"In this tutorial, you are going to learn how to map NULL values onto other values for a better data representation.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mysqltutorial.org\/mysql-basics\/avoid-displaying-null-values-by-mapping-to-other-values\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Mapping NULL Values onto Other Values\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, you are going to learn how to map NULL values onto other values for a better data representation.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mysqltutorial.org\/mysql-basics\/avoid-displaying-null-values-by-mapping-to-other-values\/\" \/>\n<meta property=\"og:site_name\" content=\"MySQL Tutorial\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-29T13:24:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/MySQL-NULL-values-example.jpg\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-basics\\\/avoid-displaying-null-values-by-mapping-to-other-values\\\/\",\"url\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-basics\\\/avoid-displaying-null-values-by-mapping-to-other-values\\\/\",\"name\":\"Mapping NULL Values onto Other Values\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-basics\\\/avoid-displaying-null-values-by-mapping-to-other-values\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-basics\\\/avoid-displaying-null-values-by-mapping-to-other-values\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mysqltutorial.org\\\/wp-content\\\/uploads\\\/2009\\\/12\\\/MySQL-NULL-values-example.jpg\",\"datePublished\":\"2009-12-27T12:49:34+00:00\",\"dateModified\":\"2023-12-29T13:24:21+00:00\",\"description\":\"In this tutorial, you are going to learn how to map NULL values onto other values for a better data representation.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-basics\\\/avoid-displaying-null-values-by-mapping-to-other-values\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-basics\\\/avoid-displaying-null-values-by-mapping-to-other-values\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-basics\\\/avoid-displaying-null-values-by-mapping-to-other-values\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mysqltutorial.org\\\/wp-content\\\/uploads\\\/2009\\\/12\\\/MySQL-NULL-values-example.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mysqltutorial.org\\\/wp-content\\\/uploads\\\/2009\\\/12\\\/MySQL-NULL-values-example.jpg\",\"width\":334,\"height\":198},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-basics\\\/avoid-displaying-null-values-by-mapping-to-other-values\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.mysqltutorial.org\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MySQL Basics\",\"item\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-basics\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How To Map NULL Values To Other Meaningful Values\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/#website\",\"url\":\"https:\\\/\\\/www.mysqltutorial.org\\\/\",\"name\":\"MySQL Tutorial\",\"description\":\"A comprehensive MySQL Tutorial\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mysqltutorial.org\\\/?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":"Mapping NULL Values onto Other Values","description":"In this tutorial, you are going to learn how to map NULL values onto other values for a better data representation.","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:\/\/www.mysqltutorial.org\/mysql-basics\/avoid-displaying-null-values-by-mapping-to-other-values\/","og_locale":"en_US","og_type":"article","og_title":"Mapping NULL Values onto Other Values","og_description":"In this tutorial, you are going to learn how to map NULL values onto other values for a better data representation.","og_url":"https:\/\/www.mysqltutorial.org\/mysql-basics\/avoid-displaying-null-values-by-mapping-to-other-values\/","og_site_name":"MySQL Tutorial","article_modified_time":"2023-12-29T13:24:21+00:00","og_image":[{"url":"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/MySQL-NULL-values-example.jpg","type":"","width":"","height":""}],"twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.mysqltutorial.org\/mysql-basics\/avoid-displaying-null-values-by-mapping-to-other-values\/","url":"https:\/\/www.mysqltutorial.org\/mysql-basics\/avoid-displaying-null-values-by-mapping-to-other-values\/","name":"Mapping NULL Values onto Other Values","isPartOf":{"@id":"https:\/\/www.mysqltutorial.org\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mysqltutorial.org\/mysql-basics\/avoid-displaying-null-values-by-mapping-to-other-values\/#primaryimage"},"image":{"@id":"https:\/\/www.mysqltutorial.org\/mysql-basics\/avoid-displaying-null-values-by-mapping-to-other-values\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/MySQL-NULL-values-example.jpg","datePublished":"2009-12-27T12:49:34+00:00","dateModified":"2023-12-29T13:24:21+00:00","description":"In this tutorial, you are going to learn how to map NULL values onto other values for a better data representation.","breadcrumb":{"@id":"https:\/\/www.mysqltutorial.org\/mysql-basics\/avoid-displaying-null-values-by-mapping-to-other-values\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mysqltutorial.org\/mysql-basics\/avoid-displaying-null-values-by-mapping-to-other-values\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mysqltutorial.org\/mysql-basics\/avoid-displaying-null-values-by-mapping-to-other-values\/#primaryimage","url":"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/MySQL-NULL-values-example.jpg","contentUrl":"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/MySQL-NULL-values-example.jpg","width":334,"height":198},{"@type":"BreadcrumbList","@id":"https:\/\/www.mysqltutorial.org\/mysql-basics\/avoid-displaying-null-values-by-mapping-to-other-values\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.mysqltutorial.org\/"},{"@type":"ListItem","position":2,"name":"MySQL Basics","item":"https:\/\/www.mysqltutorial.org\/mysql-basics\/"},{"@type":"ListItem","position":3,"name":"How To Map NULL Values To Other Meaningful Values"}]},{"@type":"WebSite","@id":"https:\/\/www.mysqltutorial.org\/#website","url":"https:\/\/www.mysqltutorial.org\/","name":"MySQL Tutorial","description":"A comprehensive MySQL Tutorial","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mysqltutorial.org\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages\/491","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/comments?post=491"}],"version-history":[{"count":1,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages\/491\/revisions"}],"predecessor-version":[{"id":13831,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages\/491\/revisions\/13831"}],"up":[{"embeddable":true,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages\/174"}],"wp:attachment":[{"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/media?parent=491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}