22,298
社区成员
发帖
与我相关
我的任务
分享
select id ,name ,flag=
(case when not exists(select * from ZiTable,FuTable where reflag=1 and (FuTableid=FuTable.id) ) then '检验'
when exists(select * from ZiTable,FuTable where reflag=1 and FuTableid=FuTable.id) then '检验中'
when 1=any(select reflag from ZiTable,FuTable where FuTableid=FuTable.id) then '检验结束' end)
from FuTable