In JDBC there are three types of Statements:
1).Statement
2).PreparedStatement
3).CallableStatement
Once a connection is obtained we can interact with the database.These three are Interfaces.By using these three statements we can do the operations on Databases using the methods provided in Interfaces.
Statement: Use for general-purpose access to your database. Useful when you are using static SQL statements at runtime. The Statement interface cannot accept parameters.
PreparedStatement : Use when you plan to use the SQL statements many times. The PreparedStatement interface accepts input parameters at runtime.
CallableStatement : Use when you want to access database stored procedures. The CallableStatement interface can also accept runtime input parameters.
1).Statement
2).PreparedStatement
3).CallableStatement
Once a connection is obtained we can interact with the database.These three are Interfaces.By using these three statements we can do the operations on Databases using the methods provided in Interfaces.
Statement: Use for general-purpose access to your database. Useful when you are using static SQL statements at runtime. The Statement interface cannot accept parameters.
PreparedStatement : Use when you plan to use the SQL statements many times. The PreparedStatement interface accepts input parameters at runtime.
CallableStatement : Use when you want to access database stored procedures. The CallableStatement interface can also accept runtime input parameters.
Big thank you for sharing this content but if anyone looking for best AutoCAD training institute in delhi look here Contact Here-+91-9311002620 Or Visit Website- https://www.htsindia.com/AutoCAD-training-courses
ReplyDelete