select t1.*,t2.username from table1 t1 left join table2 t2 on t1.userid=t2.userid
只能获得userid1的对应...
...全文
179打赏收藏
求SQL语句
表1字段 id userid1 userid2 counter 表2字段 id userid username 表2的username是表1的userid1和userid2的对应名字 现在需要将表一某记录的userid1和userid2的对应username区出来,如何实现? select t1.*,t2.username from table1 t1 left join table2 t2 on t1.userid=t2.userid 只能获得userid1的对应...