{"id":4803,"date":"2012-05-29T06:41:21","date_gmt":"2012-05-29T06:41:21","guid":{"rendered":"http:\/\/phpcodez.com\/?p=4803"},"modified":"2012-05-29T06:41:21","modified_gmt":"2012-05-29T06:41:21","slug":"sql-between","status":"publish","type":"post","link":"http:\/\/phpcodez.com\/sql-between\/","title":{"rendered":"SQL BETWEEN"},"content":{"rendered":"<p>SQL BETWEEN can be used to select data between two values given .<\/p>\n<p><strong>Syntax<\/strong><\/p>\n<p>SELECT * FROM table_name \u00a0WHERE column_name BETWEEN value1 AND value2<\/p>\n<p><strong>MySQL Table &#8211; users<\/strong><\/p>\n<p>+&#8212;-+&#8212;&#8212;+<br \/>\n| id | name |<br \/>\n+&#8212;-+&#8212;&#8212;+<br \/>\n| \u00a01 | PHP \u00a0|<br \/>\n| \u00a02 | JS \u00a0\u00a0|<br \/>\n| \u00a03 | HTML |<br \/>\n| \u00a05 | ASP \u00a0|<br \/>\n+&#8212;-+&#8212;&#8212;+<\/p>\n<p><strong>Example<\/strong><\/p>\n<p>mysql&gt; SELECT * FROM users WHERE id BETWEEN 2 AND 3;<br \/>\n+&#8212;-+&#8212;&#8212;+<br \/>\n| id | name |<br \/>\n+&#8212;-+&#8212;&#8212;+<br \/>\n| \u00a02 | JS \u00a0\u00a0|<br \/>\n| \u00a03 | HTML |<br \/>\n+&#8212;-+&#8212;&#8212;+<br \/>\n2 rows in set (0.00 sec)<\/p>\n<p><strong id=\"internal-source-marker_0.41529420716688037\"><br \/>\n<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>SQL BETWEEN can be used to select data between two values given . Syntax SELECT * FROM table_name \u00a0WHERE column_name BETWEEN value1 AND value2 MySQL Table &#8211; users +&#8212;-+&#8212;&#8212;+ | id | name | +&#8212;-+&#8212;&#8212;+ | \u00a01 | PHP \u00a0| | \u00a02 | JS \u00a0\u00a0| | \u00a03 | HTML | | \u00a05 | ASP \u00a0| &hellip; <a href=\"http:\/\/phpcodez.com\/sql-between\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">SQL BETWEEN<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[332,370,392,457,461],"class_list":["post-4803","post","type-post","status-publish","format-standard","hentry","category-sql","tag-mysql","tag-php","tag-query","tag-sql","tag-statement"],"_links":{"self":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/posts\/4803","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/comments?post=4803"}],"version-history":[{"count":0,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/posts\/4803\/revisions"}],"wp:attachment":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/media?parent=4803"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/categories?post=4803"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/tags?post=4803"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}