<bdo id='ZUI0i'></bdo><ul id='ZUI0i'></ul>

    <i id='ZUI0i'><tr id='ZUI0i'><dt id='ZUI0i'><q id='ZUI0i'><span id='ZUI0i'><b id='ZUI0i'><form id='ZUI0i'><ins id='ZUI0i'></ins><ul id='ZUI0i'></ul><sub id='ZUI0i'></sub></form><legend id='ZUI0i'></legend><bdo id='ZUI0i'><pre id='ZUI0i'><center id='ZUI0i'></center></pre></bdo></b><th id='ZUI0i'></th></span></q></dt></tr></i><div id='ZUI0i'><tfoot id='ZUI0i'></tfoot><dl id='ZUI0i'><fieldset id='ZUI0i'></fieldset></dl></div>

      <small id='ZUI0i'></small><noframes id='ZUI0i'>

    1. <legend id='ZUI0i'><style id='ZUI0i'><dir id='ZUI0i'><q id='ZUI0i'></q></dir></style></legend><tfoot id='ZUI0i'></tfoot>
      1. 在单个 SQL 查询中插入多行?

        时间:2023-07-18
          <bdo id='f0SYC'></bdo><ul id='f0SYC'></ul>

            <tbody id='f0SYC'></tbody>
        • <legend id='f0SYC'><style id='f0SYC'><dir id='f0SYC'><q id='f0SYC'></q></dir></style></legend>

            <small id='f0SYC'></small><noframes id='f0SYC'>

            1. <i id='f0SYC'><tr id='f0SYC'><dt id='f0SYC'><q id='f0SYC'><span id='f0SYC'><b id='f0SYC'><form id='f0SYC'><ins id='f0SYC'></ins><ul id='f0SYC'></ul><sub id='f0SYC'></sub></form><legend id='f0SYC'></legend><bdo id='f0SYC'><pre id='f0SYC'><center id='f0SYC'></center></pre></bdo></b><th id='f0SYC'></th></span></q></dt></tr></i><div id='f0SYC'><tfoot id='f0SYC'></tfoot><dl id='f0SYC'><fieldset id='f0SYC'></fieldset></dl></div>

                <tfoot id='f0SYC'></tfoot>

                1. 本文介绍了在单个 SQL 查询中插入多行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我要一次插入多组数据,比如说 4 行.我的表有三列:PersonIdOffice.

                  I have multiple set of data to insert at once, say 4 rows. My table has three columns: Person, Id and Office.

                  INSERT INTO MyTable VALUES ("John", 123, "Lloyds Office");
                  INSERT INTO MyTable VALUES ("Jane", 124, "Lloyds Office");
                  INSERT INTO MyTable VALUES ("Billy", 125, "London Office");
                  INSERT INTO MyTable VALUES ("Miranda", 126, "Bristol Office");
                  

                  我可以在一个 SQL 语句中插入所有 4 行吗?

                  Can I insert all 4 rows in a single SQL statement?

                  推荐答案

                  在 SQL Server 2008 中,您可以使用单个 SQL INSERT 语句插入多行.

                  In SQL Server 2008 you can insert multiple rows using a single SQL INSERT statement.

                  INSERT INTO MyTable ( Column1, Column2 ) VALUES
                  ( Value1, Value2 ), ( Value1, Value2 )
                  

                  有关此内容的参考,请查看 MOC 课程 2778A - 在 SQL Server 2008 中编写 SQL 查询.

                  For reference to this have a look at MOC Course 2778A - Writing SQL Queries in SQL Server 2008.

                  例如:

                  INSERT INTO MyTable
                    ( Column1, Column2, Column3 )
                  VALUES
                    ('John', 123, 'Lloyds Office'), 
                    ('Jane', 124, 'Lloyds Office'), 
                    ('Billy', 125, 'London Office'),
                    ('Miranda', 126, 'Bristol Office');
                  

                  这篇关于在单个 SQL 查询中插入多行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:在所有表中的所有字段中搜索特定值 (Oracle) 下一篇:为什么 Oracle 9i 将空字符串视为 NULL?

                  相关文章

                2. <i id='C5ljC'><tr id='C5ljC'><dt id='C5ljC'><q id='C5ljC'><span id='C5ljC'><b id='C5ljC'><form id='C5ljC'><ins id='C5ljC'></ins><ul id='C5ljC'></ul><sub id='C5ljC'></sub></form><legend id='C5ljC'></legend><bdo id='C5ljC'><pre id='C5ljC'><center id='C5ljC'></center></pre></bdo></b><th id='C5ljC'></th></span></q></dt></tr></i><div id='C5ljC'><tfoot id='C5ljC'></tfoot><dl id='C5ljC'><fieldset id='C5ljC'></fieldset></dl></div>
                    <legend id='C5ljC'><style id='C5ljC'><dir id='C5ljC'><q id='C5ljC'></q></dir></style></legend>
                    1. <small id='C5ljC'></small><noframes id='C5ljC'>

                      • <bdo id='C5ljC'></bdo><ul id='C5ljC'></ul>
                    2. <tfoot id='C5ljC'></tfoot>