Question
What is preparedstatement?

Answers

A prepared statement is an SQL statement that is precompiled by the database. Through precompilation, prepared statements improve the performance of SQL commands that are executed multiple times (given that the database supports prepared statements). Once compiled, prepared statements can be customized prior to each execution by altering predefined SQL parameters.

PreparedStatement pstmt = conn.prepareStatement("UPDATE EMPLOYEES SET SALARY = ? WHERE ID = ?");pstmt.setBigDecimal(1, 153833.00);pstmt.setInt(2, 110592);
Here: conn is an instance of the Connection class and "?" represents parameters.These parameters must be specified before execution.   Your Comment




More Software,Java Questions..
What is the inputsplit in map reduce software?

Can variables be used in Java without initialization?

What is the difference between java bean and enterprise java bean?

What is software configuration management?

How does the java database connectivity (jdbc) work?

What are the advantages of threads in java?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

What is object cloning in Java?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?



Search
Can you Answer!!
  • Q Are you more interested in long term or short term placements?
  • Q what are the types of vascular bundles in Araliaceae ?
  • Q How can i ensure that patches are installed at my preferred time?
  • Q What you mean by 'Radicalism' in Geography?
  • Q Which social media channels do you recommend for our business?
  • Q Who discovered sea route to India?
  • Q What is Interface inheritance
  • Q "Exit" and "Stop". What is the difference?
  • Q Which ancient sage is called father of “Sanskrit”?
  • Q Whats your favourite book beginning with the letter F?
  • Q Find the least number when divided by 7 gives the reminder 6, when divided by 6 gives reminder 5, when divided by 5 gives reminder 4 and so on....