What does “&” means in this sql where clause?

后端 未结 5 715
长情又很酷
长情又很酷 2021-01-24 20:29

What does the \"&\" mean here:

select pt.TrTp, sum(pt.TrTp)
from ProdTr pt
where TransSt & 16 <> 16  // this is the row that i don´t understand..
g         


        
5条回答
  •  感情败类
    2021-01-24 20:49

    This is bitwise AND. It simply checks if bit 4 in value is NOT set.

    I would rewrite this expression as TransSt & 16 = 0

提交回复
热议问题