今天查询产品是否被锁定,查询产品表,关联锁定产品表,因为产品可能被多次锁定,或解锁,所以每个产品取最新的一条.
不截图了,下面是部分查询语句:
select code,batch,flag from ProLock a
where not exists(
select * from ProLock
where a.ID<ID and a.code=code and a.batch=a.batch)
今天查询产品是否被锁定,查询产品表,关联锁定产品表,因为产品可能被多次锁定,或解锁,所以每个产品取最新的一条.
不截图了,下面是部分查询语句:
select code,batch,flag from ProLock a
where not exists(
select * from ProLock
where a.ID<ID and a.code=code and a.batch=a.batch)