the same sql return different result when i connect to mysql database or h2 database #15140
baizhi1989
started this conversation in
General
Replies: 2 comments
-
Hello @baizhi1989, As you mentioned, it depends on the database you're connected to. We do not process SQL in any way, but the database may process your query differently. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Also, MySQL Workbench and H2 console return the same result as you mentioned. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
System information:
Connection specification:
Describe the problem you're observing:
the same sql return different result when i connect to mysql database or h2 database
Steps to reproduce, if exist:
CREATE TABLE
a
(c1
varchar(100) DEFAULT NULL,c2
varchar(100) DEFAULT NULL,c3
varchar(100) DEFAULT NULL) ;
INSERT INTO a (c1,c2,c3) VALUES ('1','a\b','c');
-- return nothing when connect to mySql database, press \ onece
select * from a where c2 like '%a\b%';
-- return nothing when connect to mySql database, press \ twice
select * from a where c2 like '%a\\b%';
-- return nothing when connect to H2 database, press \ onece
select * from a where c2 like '%a\b%';
-- return record in when connect to database, press \ twice
select * from a where c2 like '%a\\b%';
Include any warning/errors/backtraces from the logs
Beta Was this translation helpful? Give feedback.
All reactions