select t1.user_id, t1.username, t2.phone_number from 表1 as t1 left join 表2 as t2 on t1.user_id=t2.user_id
本文主要展示如何使用mysql的多列组合查询
多列组合查询平常比较少见,初次看还觉得挺神奇的。
• mysql-filtering-by-multiple-columns[1]
• selecting-where-two-columns-are-in-a-set[2]
[1] mysql-filtering-by-multiple-columns https://www.tutorialspoint.com/mysql-filtering-by-multiple-columns
[2] selecting-where-two-columns-are-in-a-set https://dba.stackexchange.com/questions/34266/selecting-where-two-columns-are-in-a-set
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)