假设我有两个表格(在 sqlite 中,我无法更改) -
table1 -
first_name, last_name
Joe, Schmoe
Monty, Python
table2 -
full_name,job_title
Joe Schmoe,专业的 stackoverflow 问题创建者
Monty Python,Flying Circus
如何在 sqlite 中制作查询以最终从 table1 中获取条目的 job_title?直观地说,类似“select table1.first_name, table2.job_title from table1, table2 where table2.full_name like table1.first_name + '%'”
我试过摆弄 CONCATENATE(table1.first_name, '%') 并且无法让它工作。提前致谢。
(编辑以尝试清理格式)