select « JDBC « Java Database Q&A





1. Updating a database while using a preparedStatement select    stackoverflow.com

I'm selecting a subset of data from a MS SQL datbase, using a PreparedStatement. While iterating through the resultset, I also want to update the rows. At the moment I use something ...

2. selectively update prepared statement    stackoverflow.com

for an prepared statement update table t set a = ? ,b = ? where i = ? column a to stay column a ie. a=a and only need to setInt for b ...

3. jdbc batch insert and query vs single inserts with gernerated key    stackoverflow.com

I want to insert alot of rows into a table that generates the keys automatically. JDBC doesn't guarantee that getting the generated keys will work on a batch update. It is implementation-defined ...

4. In Java, can PreparedStatement.addBatch() be used for SELECT queries?    stackoverflow.com

Imagine that I have 100 SELECT queries that differ by one input. A PreparedStatement can be used for the value. All the documentation I see on the Web is for batch ...

5. Select Union + preparedStatement()    coderanch.com

6. Dynamic column selection in prepared statement?    coderanch.com

I don't believe that you can do this with a prepared statement. The table names and column names can't be parameters. If you think about it, the purpose of using prepared statements is to create a pre-compiled SQL once that can be used many time. If you used a table name or column name in the SQL, the database engine would ...

7. prepared statement -select- and?    coderanch.com

8. Prepared Statement vs. select    coderanch.com





11. Select IN query - PreparedStatement    forums.oracle.com