select * from
(
select 1 a , 'hi there' b , 102 c
union
select 2 a , 'hi there' b , 103 c
union
select 10 a , 'hi there' b , 103 c
union
select 9 a , 'hi there' b , 103 c
union
select 8 a , 'by there' b , 103 c
union
select 7 a , 'by there' b , 103 c
union
select 6 a , 'by there' b , 10 c
) as main
where b = 'by there'
and a=6
or a > 1
and a < 4
and b = 'hi there'
or a = 10
and b = 'hi there'
No comments:
Post a Comment