简体   繁体   中英

MySql , Select with special Character

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

Try use IN operator:

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

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

Try to escape the string using QUOTE function:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM