{"id":26,"date":"2005-11-19T04:00:00","date_gmt":"2005-11-19T04:00:00","guid":{"rendered":"http:\/\/thenoyes.com\/littlenoise\/?p=26"},"modified":"2006-06-16T20:55:13","modified_gmt":"2006-06-16T20:55:13","slug":"concatenating-null","status":"publish","type":"post","link":"https:\/\/thenoyes.com\/littlenoise\/?p=26","title":{"rendered":"Concatenating NULL"},"content":{"rendered":"<pre>\r\nCREATE TABLE myTable (\r\n id INT,\r\n string varchar(100) DEFAULT NULL\r\n);\r\nINSERT INTO myTable (id, string) VALUES (1, \"First\"), (2, NULL);\r\nUPDATE myTable SET string = CONCAT(id, \" has the value \", string);\r\nSELECT * FROM myTable;\r\n<\/pre>\n<p>\nWhat is the output?<br \/>\n<spoiler 'Show Answer' 'Hide Answer'><\/p>\n<pre>\r\n+------+-----------------------+\r\n| id   | string                |\r\n+------+-----------------------+\r\n|    1 | 1 has the value First |\r\n|    2 | NULL                  |\r\n+------+-----------------------+\r\n<\/pre>\n<p><\/spoiler><\/p>\n","protected":false},"excerpt":{"rendered":"<p>CREATE TABLE myTable ( id INT, string varchar(100) DEFAULT NULL ); INSERT INTO myTable (id, string) VALUES (1, &#8220;First&#8221;), (2, NULL); UPDATE myTable SET string = CONCAT(id, &#8221; has the value &#8220;, string); SELECT * FROM myTable; What is the output? +&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+ | id | string | +&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+ | 1 | 1 has the value [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[6],"tags":[],"class_list":["post-26","post","type-post","status-publish","format-standard","hentry","category-gotchas"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p2IBF1-q","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/thenoyes.com\/littlenoise\/index.php?rest_route=\/wp\/v2\/posts\/26","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thenoyes.com\/littlenoise\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thenoyes.com\/littlenoise\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thenoyes.com\/littlenoise\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thenoyes.com\/littlenoise\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=26"}],"version-history":[{"count":0,"href":"https:\/\/thenoyes.com\/littlenoise\/index.php?rest_route=\/wp\/v2\/posts\/26\/revisions"}],"wp:attachment":[{"href":"https:\/\/thenoyes.com\/littlenoise\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=26"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thenoyes.com\/littlenoise\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=26"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thenoyes.com\/littlenoise\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}