select fields from 另一张表 as 另一张表 left join 一张表 as 一张表 ON 一张表.field=另一张表.field where 条件 我最多的SQL语句用jion写过100多行,才两张表,随便怎么查都行啦
select * from userTable u,testTable t where u.id = t.id and t.字段 not like %123%’这两个表有关联就可以这么写,没有的话需要join