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.
我的自制搜索页面有问题。有2张桌子:
**name status** Kevin 111 <-table1 Lucas 222 **id data** 111 student <-table2 222 pupil
所以你需要查询,它会给我这样的表:
Kevin student Lucas pupil
感谢帮助!
尝试这个
SELECT t1.name, t2.data FROM table1 t1 INNER JOIN table2 t2 ON t1.status = t2.id ORDER BY t1.name