@@ -0,0 +1,2179 @@
+/*%0A * Microsoft JDBC Driver for SQL Server%0A * %0A * Copyright(c) Microsoft Corporation All rights reserved.%0A * %0A * This program is made available under the terms of the MIT License. See the LICENSE file in the project root for more information.%0A */%0Apackage com.microsoft.sqlserver.jdbc.unit.statement;%0A%0Aimport static org.junit.jupiter.api.Assertions.assertEquals;%0A%0Aimport java.sql.DriverManager;%0Aimport java.sql.SQLException;%0Aimport java.sql.Statement;%0A%0Aimport org.junit.jupiter.api.Test;%0Aimport org.junit.platform.runner.JUnitPlatform;%0Aimport org.junit.runner.RunWith;%0A%0Aimport com.microsoft.sqlserver.jdbc.SQLServerConnection;%0Aimport com.microsoft.sqlserver.testframework.AbstractTest;%0Aimport com.microsoft.sqlserver.testframework.DBConnection;%0A%0A@RunWith(JUnitPlatform.class)%0Apublic class SelectIntoUpdateCountTest extends AbstractTest %7B%0A    private static String tableName = %22%5B#SourceTableForSelectInto%5D%22;%0A%0A    /**%0A     * Tests update count returned by SELECT INTO%0A     * %0A     * @throws SQLException%0A     */%0A    @Test%0A    public void testSelectIntoUpdateCount() throws SQLException %7B%0A        SQLServerConnection con = (SQLServerConnection) DriverManager.getConnection(connectionString);%0A        %0A        // Azure does not do SELECT INTO%0A        if (!DBConnection.isSqlAzure(con)) %7B%0A            Statement stmt = con.createStatement();%0A            %0A            // expected values%0A            int numRowsToCopy = 2;%0A    %0A            stmt.executeUpdate(%22CREATE TABLE %22 + tableName + %22 (col1 int primary key, col2 varchar(3), col3 varchar(128))%22);%0A            stmt.executeUpdate(%22INSERT INTO %22 + tableName + %22 VALUES (1, 'CAN', 'Canada')%22);%0A            stmt.executeUpdate(%22INSERT INTO %22 + tableName + %22 VALUES (2, 'USA', 'United States of America')%22);%0A            stmt.executeUpdate(%22INSERT INTO %22 + tableName + %22 VALUES (3, 'JPN', 'Japan')%22);%0A%0A            int updateCount = stmt.executeUpdate(%22SELECT * INTO #TMPTABLE FROM %22 + tableName + %22 WHERE col1 %3C= 2%22);%0A            assertEquals(numRowsToCopy, updateCount, %22Incorrect update count%22);%0A            %0A            if (null != stmt)%0A                stmt.close();%0A        %7D%0A        if (null != con)%0A            con.close();%0A    %7D%0A%0A%7D%0A

add SelectIntoUpdateCountTest