{"id":83,"date":"2009-10-27T15:29:12","date_gmt":"2009-10-27T15:29:12","guid":{"rendered":"http:\/\/blog.rabihtawil.com\/?p=82"},"modified":"2010-07-22T13:33:20","modified_gmt":"2010-07-22T13:33:20","slug":"more-about-insert-statement","status":"publish","type":"post","link":"http:\/\/www.raytawil.com\/?p=83","title":{"rendered":"More about insert statement"},"content":{"rendered":"<p>I\u2019ve wandered in some forums I\u2019ve found another way to insert multiple data.<\/p>\n<p>before<\/p>\n<blockquote>\n<pre>INSERT INTO TableName (Col1, Col2)\nVALUES (1, 'John');\nINSERT INTO TableName (Col1, Col2)\nVALUES (2, 'Mike');\nINSERT INTO TableName (Col1, Col2)\nVALUES (3, 'Jane');<\/pre>\n<\/blockquote>\n<p>another way I found<\/p>\n<blockquote>\n<pre>INSERT INTO TableName (Col1, Col2)\nSELECT 1 , 'John'\nUNION ALL\nSELECT 2 , 'Mike'\nUNION ALL\nSELECT 3 , 'Jane'\n\n--only in SQL Server 2008\nINSERT INTO TableName (Col1, Col2)\nVALUES (1, 'John'),\n(2, 'Mike'),\n(3, 'Jane')<\/pre>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>I\u2019ve wandered in some forums I\u2019ve found another way to insert multiple data. before INSERT INTO TableName (Col1, Col2) VALUES (1, &#8216;John&#8217;); INSERT INTO TableName (Col1, Col2) VALUES (2, &#8216;Mike&#8217;); INSERT INTO TableName (Col1, Col2) VALUES (3, &#8216;Jane&#8217;); another way I found INSERT INTO TableName (Col1, Col2) SELECT 1 , &#8216;John&#8217; UNION ALL SELECT 2 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[112],"tags":[45,52],"_links":{"self":[{"href":"http:\/\/www.raytawil.com\/index.php?rest_route=\/wp\/v2\/posts\/83"}],"collection":[{"href":"http:\/\/www.raytawil.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.raytawil.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.raytawil.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.raytawil.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=83"}],"version-history":[{"count":1,"href":"http:\/\/www.raytawil.com\/index.php?rest_route=\/wp\/v2\/posts\/83\/revisions"}],"predecessor-version":[{"id":167,"href":"http:\/\/www.raytawil.com\/index.php?rest_route=\/wp\/v2\/posts\/83\/revisions\/167"}],"wp:attachment":[{"href":"http:\/\/www.raytawil.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=83"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.raytawil.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=83"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.raytawil.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=83"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}