{"id":19,"date":"2024-06-20T00:16:21","date_gmt":"2024-06-20T00:16:21","guid":{"rendered":"https:\/\/techobjects.net\/?p=19"},"modified":"2024-06-20T00:16:21","modified_gmt":"2024-06-20T00:16:21","slug":"sql-case-statement","status":"publish","type":"post","link":"https:\/\/techobjects.net\/?p=19","title":{"rendered":"SQL Case Statement"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Cases are used to return a specific value (hardcoded or field from the table) based on a condition.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CASE \n WHEN &#91;Condition] THEN &#91;Return Value\/ Field]\n ELSE &#91;If When condition not met return this value\/field]\nEND;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Cases are used to return a specific value (hardcoded or field from the table) based on a condition. Example:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[7],"class_list":["post-19","post","type-post","status-publish","format-standard","hentry","category-sql","tag-sql-case"],"brizy_media":[],"_links":{"self":[{"href":"https:\/\/techobjects.net\/index.php?rest_route=\/wp\/v2\/posts\/19","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techobjects.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techobjects.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techobjects.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techobjects.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=19"}],"version-history":[{"count":0,"href":"https:\/\/techobjects.net\/index.php?rest_route=\/wp\/v2\/posts\/19\/revisions"}],"wp:attachment":[{"href":"https:\/\/techobjects.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=19"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techobjects.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=19"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techobjects.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}