Thursday, 15 April 2010

java - Use prepared statement to delete values from database -



java - Use prepared statement to delete values from database -

how can utilize prepared statement delete entries database? have found must write next code

string deletesql = "delete dbuser user_id = ?

but want specify clause more 1 variable. have used and operator doesn't seem work.

here illustration if syntax not correct..

delete dbuser user_id = ? , user_name = ?;

you can append more conditions in clause using more and ... operators.

or if have more 1 user_ids delete in single query..

delete dbuser user_id in (?, ?, ?, ?);

java sql prepared-statement

No comments:

Post a Comment