1个回答
2015-11-26
展开全部
可以这样来查询:
1
2
3
4
5
6
7
8
9
10
<a href="https://www.baidu.com/s?wd=select&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YLuWnkrANBuH9hPANBuADv0AP8IA3qPjfsn1bkrjKxmLKz0ZNzUjdCIZwsrBtEXh9GuA7EQhF9pywdQhPEUiqkIyN1IA-EUBtkn16zPHbsrjRYrjmLPjcdPHfs" target="_blank" class="baidu-highlight">select</a> s.a01, s.<a href="https://www.baidu.com/s?wd=a02&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YLuWnkrANBuH9hPANBuADv0AP8IA3qPjfsn1bkrjKxmLKz0ZNzUjdCIZwsrBtEXh9GuA7EQhF9pywdQhPEUiqkIyN1IA-EUBtkn16zPHbsrjRYrjmLPjcdPHfs" target="_blank" class="baidu-highlight">a02</a>, 1.000 <a href="https://www.baidu.com/s?wd=as&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YLuWnkrANBuH9hPANBuADv0AP8IA3qPjfsn1bkrjKxmLKz0ZNzUjdCIZwsrBtEXh9GuA7EQhF9pywdQhPEUiqkIyN1IA-EUBtkn16zPHbsrjRYrjmLPjcdPHfs"target="_blank" class="baidu-highlight">as</a> a03, s.a04
<a href="https://www.baidu.com/s?wd=from&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YLuWnkrANBuH9hPANBuADv0AP8IA3qPjfsn1bkrjKxmLKz0ZNzUjdCIZwsrBtEXh9GuA7EQhF9pywdQhPEUiqkIyN1IA-EUBtkn16zPHbsrjRYrjmLPjcdPHfs" target="_blank" class="baidu-highlight">from</a> table_name s,
(
<a href="https://www.baidu.com/s?wd=select&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YLuWnkrANBuH9hPANBuADv0AP8IA3qPjfsn1bkrjKxmLKz0ZNzUjdCIZwsrBtEXh9GuA7EQhF9pywdQhPEUiqkIyN1IA-EUBtkn16zPHbsrjRYrjmLPjcdPHfs" target="_blank" class="baidu-highlight">select</a> 1.000 <a href="https://www.baidu.com/s?wd=as&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YLuWnkrANBuH9hPANBuADv0AP8IA3qPjfsn1bkrjKxmLKz0ZNzUjdCIZwsrBtEXh9GuA7EQhF9pywdQhPEUiqkIyN1IA-EUBtkn16zPHbsrjRYrjmLPjcdPHfs" target="_blank" class="baidu-highlight">as</a> val
union
<a href="https://www.baidu.com/s?wd=select&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YLuWnkrANBuH9hPANBuADv0AP8IA3qPjfsn1bkrjKxmLKz0ZNzUjdCIZwsrBtEXh9GuA7EQhF9pywdQhPEUiqkIyN1IA-EUBtkn16zPHbsrjRYrjmLPjcdPHfs" target="_blank" class="baidu-highlight">select</a> 2.000
union
select 3.000
) c
where s.a03 >= c.val
1
2
3
4
5
6
7
8
9
10
<a href="https://www.baidu.com/s?wd=select&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YLuWnkrANBuH9hPANBuADv0AP8IA3qPjfsn1bkrjKxmLKz0ZNzUjdCIZwsrBtEXh9GuA7EQhF9pywdQhPEUiqkIyN1IA-EUBtkn16zPHbsrjRYrjmLPjcdPHfs" target="_blank" class="baidu-highlight">select</a> s.a01, s.<a href="https://www.baidu.com/s?wd=a02&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YLuWnkrANBuH9hPANBuADv0AP8IA3qPjfsn1bkrjKxmLKz0ZNzUjdCIZwsrBtEXh9GuA7EQhF9pywdQhPEUiqkIyN1IA-EUBtkn16zPHbsrjRYrjmLPjcdPHfs" target="_blank" class="baidu-highlight">a02</a>, 1.000 <a href="https://www.baidu.com/s?wd=as&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YLuWnkrANBuH9hPANBuADv0AP8IA3qPjfsn1bkrjKxmLKz0ZNzUjdCIZwsrBtEXh9GuA7EQhF9pywdQhPEUiqkIyN1IA-EUBtkn16zPHbsrjRYrjmLPjcdPHfs"target="_blank" class="baidu-highlight">as</a> a03, s.a04
<a href="https://www.baidu.com/s?wd=from&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YLuWnkrANBuH9hPANBuADv0AP8IA3qPjfsn1bkrjKxmLKz0ZNzUjdCIZwsrBtEXh9GuA7EQhF9pywdQhPEUiqkIyN1IA-EUBtkn16zPHbsrjRYrjmLPjcdPHfs" target="_blank" class="baidu-highlight">from</a> table_name s,
(
<a href="https://www.baidu.com/s?wd=select&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YLuWnkrANBuH9hPANBuADv0AP8IA3qPjfsn1bkrjKxmLKz0ZNzUjdCIZwsrBtEXh9GuA7EQhF9pywdQhPEUiqkIyN1IA-EUBtkn16zPHbsrjRYrjmLPjcdPHfs" target="_blank" class="baidu-highlight">select</a> 1.000 <a href="https://www.baidu.com/s?wd=as&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YLuWnkrANBuH9hPANBuADv0AP8IA3qPjfsn1bkrjKxmLKz0ZNzUjdCIZwsrBtEXh9GuA7EQhF9pywdQhPEUiqkIyN1IA-EUBtkn16zPHbsrjRYrjmLPjcdPHfs" target="_blank" class="baidu-highlight">as</a> val
union
<a href="https://www.baidu.com/s?wd=select&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1YLuWnkrANBuH9hPANBuADv0AP8IA3qPjfsn1bkrjKxmLKz0ZNzUjdCIZwsrBtEXh9GuA7EQhF9pywdQhPEUiqkIyN1IA-EUBtkn16zPHbsrjRYrjmLPjcdPHfs" target="_blank" class="baidu-highlight">select</a> 2.000
union
select 3.000
) c
where s.a03 >= c.val
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询