I tried a query which
- A) fills var table
- B) gets the var table data as helpful to select next data
CREATE PROCEDURE Test AS BEGIN DECLARE @A TABLE ( id INT NOT NULL, name VARCHAR(50) ); INSERT @A SELECT id,name FROM table1 WHERE id>10 DECLARE @B TABLE ( address VARCHAR(255), city VARCHAR(128) ); INSERT @b SELECT address,city FROM table2 WHERE id IN(SELECT id FROM @A) END;
... so, as a result, I have two select statements in my procedure :S The thing is... All procedures which contain just one select statement behave fine with JDBC4 but here something is wrong because when procedure contains two select statement it returns nothing :( So my question can two select statement cause the problem with jdbc4? A if it does how to fix it?