Hi Li, '_' is a wildcard character matching a single character. To search for the literal '_' you have to escape it.
There may be several ways to do that, but one is described here: https://db.apache.org/derby/docs/10.11/ref/rrefjdbc28456.html Regards, -- Kristian tor. 9. jul. 2015, 18.56 skrev yiran9937 <yiran9...@sina.com>: > Hi, I am Li. I started to learn to use the Derby no long time. I used > derby database in Eclipse and start connection with ij tool which in > derbytools.jar. The derby version is 10.9. Once, I select data from a table > with SQL "select * from tig_users where user_id like 'test_01_%';", but got > below data. Note the first record, the user_id 'test_01@yiranlocal' > should not matching with 'test_01_%', but I got it. I have no idea with > this. I try to test this with the newest version 10.11, but got the same > result. What happened and how can I get correct data result? I will very > pleased for any suggestion. Thanks and Regards, Li > ------------------------------ > View this message in context: got wrong data with using '%' as condition > <http://apache-database.10148.n7.nabble.com/got-wrong-data-with-using-as-condition-tp144340.html> > Sent from the Apache Derby Users mailing list archive > <http://apache-database.10148.n7.nabble.com/Apache-Derby-Users-f95095.html> > at Nabble.com. >