{"id":1010,"date":"2019-12-02T21:40:16","date_gmt":"2019-12-02T08:40:16","guid":{"rendered":"https:\/\/www.ronella.xyz\/?p=1010"},"modified":"2019-12-02T21:41:32","modified_gmt":"2019-12-02T08:41:32","slug":"using-values-as-the-record-source-for-select-statement","status":"publish","type":"post","link":"https:\/\/www.ronella.xyz\/?p=1010","title":{"rendered":"Using Values as the Record Source for Select Statement"},"content":{"rendered":"<p>Values can become a valid record source for select statement if the values has <strong>table alias<\/strong> and <strong>column names<\/strong> as follows:<\/p>\n<pre style=\"white-space: pre;\">SELECT dummy_table.* \r\nFROM (VALUES ('record1'),\r\n\t ('record2'),\r\n\t ('record3'),\r\n\t ('record4'),\r\n\t ('record5'),\r\n\t ('record6'),\r\n\t ('record7'),\r\n\t ('record8'),\r\n\t ('record9')) dummy_table (column1)<\/pre>\n<p>From the preceding select statement, the <strong>dummy_table<\/strong> is the table alias and the column name is <strong>column1<\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Values can become a valid record source for select statement if the values has table alias and column names as follows: SELECT dummy_table.* FROM (VALUES (&#8216;record1&#8217;), (&#8216;record2&#8217;), (&#8216;record3&#8217;), (&#8216;record4&#8217;), (&#8216;record5&#8217;), (&#8216;record6&#8217;), (&#8216;record7&#8217;), (&#8216;record8&#8217;), (&#8216;record9&#8217;)) dummy_table (column1) From the preceding select statement, the dummy_table is the table alias and the column name is column1.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[58],"tags":[],"_links":{"self":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts\/1010"}],"collection":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1010"}],"version-history":[{"count":2,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts\/1010\/revisions"}],"predecessor-version":[{"id":1012,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts\/1010\/revisions\/1012"}],"wp:attachment":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1010"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1010"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}