By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE test (
a int,
b int,
c int
);
INSERT INTO test VALUES (1,2,3),(1,2,4),(1,3,3),(1,3,4),(2,2,3),(3,2,3)
6 rows affected
SELECT * FROM test WHERE (a, b, c) > (1, 2, 3)
Msg 4145 Level 15 State 1 Line 1
An expression of non-boolean type specified in a context where a condition is expected, near ','.
SELECT * FROM test WHERE (a=1 and b=2 and c>3) or (a=1 and b>2) or a>1
a | b | c |
---|---|---|
1 | 2 | 4 |
1 | 3 | 3 |
1 | 3 | 4 |
2 | 2 | 3 |
3 | 2 | 3 |