比如说LEFT JOIN drp_yctzd l ON a.djbh = l.lxdj OR l.bz LIKE %a.djbh%,我想like 为a.djbh这个字段,但我上面写法不行,正确的应该怎么写?
什么数据库,如SqlServer:
LEFT JOIN drp_yctzd l ON a.djbh = l.lxdj OR l.bz LIKE '%'+a.djbh+'%'
---------------
MySQL:
LEFT JOIN drp_yctzd l ON a.djbh = l.lxdj OR l.bz LIKE concat('%',a.djbh,'%')