Home > database >  setstring
setstring

Time:09-19

I use PreparedStatement setstring assignment to SQL statements, because the SQL statement is fuzzy query: select * form user where
Name like '%? % ', he can't identify the question mark as a result, the old said I parameter overflow, I removed the quotes and percent can again... Pray god explain reason

CodePudding user response:

Or by SQL can normal operation:
Select * form the user where the name like?

Assignment
Value is "%" (you replace the actual value) + + XXX "%" is ok,

CodePudding user response:

reference 1/f, gypsy song response:
SQL or press can normal operation:
Select * form the user where the name like?

Assignment
A value of "%" (you replace the actual value) + + XXX "%" is ok,

To solve, thank you , is that you solve

CodePudding user response:

refer to the second floor weixin_46001291 response:
Quote: refer to 1st floor gypsy song response:
SQL or press can normal operation:
Select * form the user where the name like?

Assignment
A value of "%" (you replace the actual value) + + XXX "%" is ok,

To solve, thank you , is that you solve

You're welcome, nothing to tieba
  • Related