A S ID
1 1 1
2 1 2
3 1 3
4 1 4
1 2 5
2 2 6
3 2 7
4 2 8
5 2 9
6 2 10
7 2 11
1 3 12
2 3 13
3 3 14
4 3 15
5 3 16
6 3 17
1 4 18
2 4 19
3 4 20
4 4 21
5 4 23
6 4 24
7 4 25
8 4 26
1 5 27
2 5 28
i have table with tree columns (ID,S,A)
i want to select Ids where S between ( 2 and 4 ) and A from 2 where S=2 To A=6 where S=4)
result will be 6,7,.......,23, 24
what is the efficient SOL statement get this result ??
1 1 1
2 1 2
3 1 3
4 1 4
1 2 5
2 2 6
3 2 7
4 2 8
5 2 9
6 2 10
7 2 11
1 3 12
2 3 13
3 3 14
4 3 15
5 3 16
6 3 17
1 4 18
2 4 19
3 4 20
4 4 21
5 4 23
6 4 24
7 4 25
8 4 26
1 5 27
2 5 28
i have table with tree columns (ID,S,A)
i want to select Ids where S between ( 2 and 4 ) and A from 2 where S=2 To A=6 where S=4)
result will be 6,7,.......,23, 24
what is the efficient SOL statement get this result ??