I can’t find an answer one way or the other for this. Pretty simple question with very little detail.
Is there a better way to do something like this:
SELECT *
FROM tablename tn
WHERE tn.col1 = 1
AND tn.col2 = 1
AND tn.col3 = 1
AND tn.col4 = 1
...
AND tn.coln = 1
Where multiple columns all have to be compared the same way to a single constant?
I think this is the best way to do this.As per my understanding there is no other bettwr way to achieve this.