ParameterMetaData(as an interface) is extracted from a PreparedStatement object using the PreparedStatement.getParameterMetaData() method. The ParameterMetaData interface provides a means to get metadata describing the input parameters (designated as a ? in a SQL statement) to a dynamically prepared statement. The SQL 92 and SQL 99 standards specify a DESCRIBE INPUT statement for dynamic SQL. The JDBC 3.0 specification (included in JDK 1.5) introduces a ParameterMetaData class and methods that correspond to DESCRIBE INPUT support. SQL’s DESCRIBE INPUT functionality is similar to ParameterMetaData—all parameter markers used in a prepared or call statement are described with the DESCRIBE INPUT statement, regardless of the mode of the formal parameter. You may use the SQL’s DESCRIBE INPUT statement to return input parameter information before a prepared statement is executed.
For example if you have a PreparedStatement object, which represents the following SQL query:
select id, name, age from employees where id > ? and age < ?then the ParameterMetaData object extracted from this PreparedStatement object (using PreparedStatement.getParameterMetaData()) will have metadata for two parameters:
Figure shows the relationships of PreparedStatement to ParameterMetaData.
JDBC Related Interview Questions |
|
---|---|
Core Java Interview Questions | JSP Interview Questions |
Java Servlets Interview Questions | EJB(Enterprise JavaBeans) Interview Questions |
JSTL(JSP Standard Tag Library) Interview Questions | JNDI (Java Naming and Directory Interface) Interview Questions |
Java Bean Utils Interview Questions | AWT (Abstract Window Toolkit) Interview Questions |
Jdbc Tutorial
What Is Jdbc Programming?
Database Metadata, Part 1
Database Metadata, Part 2
Resultset Metadata
Parameter Metadata
Exploring Driver Property Information
Rowset Metadata A
Web Access To Metadata,part 1
Web Access To Metadata, Part 2
Rdf And Jdbc Metadata
Text Resumes
Visual Resumes
Social Resumes
Resume Quality
IT Resume Samples
MARKETING Resume Samples
HR Resume Samples
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.