G
gk
Please see this ..
http://java.sun.com/j2se/1.4.2/docs/api/java/sql/PreparedStatement.html
PreparedStatement : An object that represents a precompiled SQL
statement.
"precompiled SQL statement" ... who compiled this ?
Is it working like this way ...when I first execute the code below
DBMS compiles when it encounter for the first time and then next time
DBMS does not compile . So, We call it precompiled.
java code:
PreparedStatement pstmt = con.prepareStatement("UPDATE EMPLOYEES
SET SALARY = ? WHERE ID = ?");
pstmt.setBigDecimal(1, 153833.00)
pstmt.setInt(2, 110592)
If I used Statement instead of PreparedStatement does that mean
everytime DBMS will compile the SQL query ?
http://java.sun.com/j2se/1.4.2/docs/api/java/sql/PreparedStatement.html
PreparedStatement : An object that represents a precompiled SQL
statement.
"precompiled SQL statement" ... who compiled this ?
Is it working like this way ...when I first execute the code below
DBMS compiles when it encounter for the first time and then next time
DBMS does not compile . So, We call it precompiled.
java code:
PreparedStatement pstmt = con.prepareStatement("UPDATE EMPLOYEES
SET SALARY = ? WHERE ID = ?");
pstmt.setBigDecimal(1, 153833.00)
pstmt.setInt(2, 110592)
If I used Statement instead of PreparedStatement does that mean
everytime DBMS will compile the SQL query ?