Home > Mobile >  MySql , Select with special Character
MySql , Select with special Character

Time:08-12

so i have a table with this data, but when i query "select * from assetprofile WHERE description1='(1) GENSET\FOR ATM' ", it shows nothing . any help?

enter image description here

CodePudding user response:

Try use IN operator:

SELECT * from assetprofile WHERE description1 IN ('(1) GENSET\FOR ATM')

CodePudding user response:

The sample data does not have a space between the parentheses and GET, but your query does.

CodePudding user response:

Try to escape the string using QUOTE function:

SELECT * FROM assetprofile WHERE description1 = QUOTE('(1) GENSET\FOR ATM'); 
  • Related