Java JDBC: number of rows returned by a "CREATE TABLE AS SELECT" instruction
Posted on 2011-09-26
Executing in Java, on a Oracle database, the sql statement:
int rows = stm.executeUpdate("CREATE TABLE A as select * from MONTHS")
the table A in created and the int variable "rows" contains the number of written rows in the table.
Executing the same statement in SQL Server, with the correct sintax:
int rows = stm.executeUpdate("SELECT * into A from MONTHS");
The rows variable is "-1".
The different databases implement in a different way that JDBC method and don't return the number of written rows? Is there a way to do that on SQL Server?
Thank you in advance