从SQL中选择结果中选择 [英] select from select result in sql
本文介绍了从SQL中选择结果中选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
如何从sql中的选择结果中选择选择 ...
例子:
hi all
how do select from select result in sql ...
example :
select * from customer
=
=
one
two
three
现在,如何 从以上结果中选择 例如,我想要获得前2条记录
非常感谢
Now , How Do Select From Above Result For Example I Want Top 2 Record
thanks a lot
推荐答案
选择前两个记录:
for selecting top two records :
select top 2 * from customer
够了
或试试:
is enough
or try :
select top 2 * from (select * from customer)a
在您的情况下,您所需要的只是使用subquery,从Google中搜索和学习更多
in your case all you need is to use subquery , search and learn from google more
我认为您正在寻找的是IN关键字.请查看下面的链接,让我知道您是否要这样.
http://www.w3schools.com/sql/sql_in.asp [
I think what you are looking for is the IN keyword. Have a look at the link below and let me know if thats what you want.
http://www.w3schools.com/sql/sql_in.asp[^]
这篇关于从SQL中选择结果中选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文