Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想加入两个表t1,t2这样列中的t2值为any valid string including null followed by a value in column of t table.
t1
t2
any valid string including null followed by a value in column of t table
我想要类似的东西:
SELECT * FROM t_cities c JOIN temp_table t ON c.NAME LIKE "%t.token"但不知道确切的语法。上面的语句当然给出了一个错误。
SELECT * FROM t_cities c JOIN temp_table t ON c.NAME LIKE "%t.token"
试试这个查询,它应该可以工作。
SELECT * FROM t_cities as a JOIN temp_table as b ON a.NAME LIKE concat("%",b.token);
注意- 此查询不会像普通连接那样快,并且需要时间。
尝试
SELECT * FROM t_cities c JOIN temp_table t ON c.field = t.field where c.NAME LIKE "%t.token"