O'Reilly logo

Apache Derby—Off to the Races: Includes Details of IBM® Cloudscape™ by Dan Scott, George Baklarz, Paul C. Zikopoulos

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Prepared Statements

Much of the SQL that needs to be executed in an application can be handled with the execute(), executeQuery(), and executeUpdate() methods. However, each one of these methods requires the entire SQL string to be used as the input parameter. Aside from having to build the SQL statement, the application will need to deal with string constants. Strings within SQL statements are enclosed by single quotation marks ('). If a string contains single quotation marks or other control characters, it can be almost impossible to build an SQL statement.

During execution, an application will need to build the SQL statement dynamically and then submit it for processing. This process would have to be repeated each time, even if just one parameter ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required