34,587
社区成员
发帖
与我相关
我的任务
分享
SELECT distinct
deport_mid.id,
deport_mid.commodity_code,
deport_mid.ammount,
deport_mid.state,
deport_mid.commodity_code,
deport_mid.remark,
deport_mid.opt_code,
deport_mid.deport_top_code,
commodity.unit,
commodity.packaging,
commodity.name,
deport_mid.price,
commodity.price ,
deport_mid.getdate
FROM deport_mid right join commodity
on deport_mid.commodity_code = commodity.code
order by deport_mid.getdate desc
distinct位置改一下
SELECT distinct deport_mid.id,
deport_mid.commodity_code,
deport_mid.ammount,
deport_mid.state,
deport_mid.commodity_code,
deport_mid.remark,
deport_mid.opt_code,
deport_mid.deport_top_code,
commodity.unit,
commodity.packaging,
commodity.name,
deport_mid.price,
commodity.price ,
deport_mid.getdate
FROM deport_mid right join commodity on deport_mid.commodity_code = commodity.code order by deport_mid.getdate desc
SELECT distinct deport_mid.id,
deport_mid.commodity_code,
deport_mid.ammount,
deport_mid.state,
deport_mid.commodity_code,
deport_mid.remark,
deport_mid.opt_code,
deport_mid.deport_top_code,
commodity.unit,
commodity.packaging,
commodity.name,
deport_mid.price,
commodity.price ,
deport_mid.getdate
FROM deport_mid right join commodity on deport_mid.commodity_code = commodity.code order by deport_mid.getdate desc