我的本地测试输出和mysql的一样,而且cli和sock2个都试过,没有问题啊?
function 的
select length('YI1WT4BKL21ZLIVKS5JUQWCYSX7QDNVC0856XEQUBN537H2SBR75H4OMVC1UEFPTCGW5LQ10H6Q4L69') len1, length('X6HP94R66OABEK01NXIVTCIVBLUTLIH2FK0GV4QTOM7I25NTK1M5YADC4') len2;
- 79 | 57
-- below are some requests executed before(partial) --
-- init data
CREATE TABLE function_table(id int, name char(20), score float, u_date date);
CREATE TABLE function_table_2(id int, name char(30), score float, u_date date);
insert into function_table VALUES (2, 'NB7D4EPJ0', 5.06, '2016-04-24');
insert into function_table VALUES (7, '4YUT1ATG7APBUCBTH', 4.73, '2020-08-28');
insert into function_table VALUES (4, 'DM1FXBZ1IPO9HIDN', 4.10, '2024-12-11');
...
join tables
Select * from join_table_4 inner join join_table_1 on join_table_1.name>join_table_4.col and join_table_1.id<join_table_4.id;
- 5 | 13.5 | 4 | 16a
-- below are some requests executed before(partial) --
-- init data
CREATE TABLE join_table_1(id int, name char(20));
CREATE TABLE join_table_2(id int, age int);
CREATE TABLE join_table_3(id int, level int);
create table join_table_empty_1(id int, num_empty_1 int);
create table join_table_empty_2(id int, num_empty_2 int);
...
-- typecast
INSERT INTO join_table_1 VALUES (4, '16a');
Select * from join_table_1 inner join join_table_2 on join_table_1.name<join_table_2.age and join_table_1.id=join_table_2.id;
CREATE TABLE join_table_4(id int, col float);
INSERT INTO join_table_4 VALUES(1, 16.5);
INSERT INTO join_table_4 VALUES(2, 17.5);
...