Three types of statements
In this chapter you will learn:
Statements in JDBC
We can issue sql statements to database through JDBC connection. There are three types of statements in JDBC we can use.
Statement
CallableStatement
PreparedStatement
They are both interfaces defining the methods and properties we can use to send sql commands to database and receive data from database.
The following table provides a summary of each interface.
Interfaces | Description |
---|---|
Statement | Useful for static SQL statements. The Statement interface cannot accept parameters. |
PreparedStatement | Useful for passing parameters at runtime. |
CallableStatement | Useful for database stored procedures. |
Next chapter...
What you will learn in the next chapter:
Home » Java Tutorial » Statements, ResultSet, Exception, Warning