美文网首页
mysql_左查询

mysql_左查询

作者: 一蓑烟雨_龙哥 | 来源:发表于2020-05-18 09:32 被阅读0次
    image.png

    做查询,b.ProvinceName as Brand 表示将查查到的b.ProvinceName 字段,结果用Brand 代替
    select b.ProvinceName as Brand,c.CityName as Model,d.Name as Number,a.Date,a.XH,a.LZBM,a.SJBM,a.WorkGroup,
    a.SjWorkGroup,FullName as CZY,a.DateTime from TB_WriteLog a left join TB_Province b on a.Brand=b.ID left join TB_City c on a.Model=c.ID
    left join TB_DictData d on a.Number=d.ID
    left join T_ACL_User e on a.CZY=e.ID
    where a.CZY <>''

    image.png

    相关文章

      网友评论

          本文标题:mysql_左查询

          本文链接:https://www.haomeiwen.com/subject/axwyohtx.html