select max(account_id ) from(select top 5 account_id from account)子查询没起作用为什么?
来源:学生作业帮助网 编辑:六六作业网 时间:2025/01/09 21:35:22
selectmax(account_id)from(selecttop5account_idfromaccount)子查询没起作用为什么?selectmax(account_id)from(selec
select max(account_id ) from(select top 5 account_id from account)子查询没起作用为什么?
select max(account_id ) from(select top 5 account_id from account)子查询没起作用为什么?
select max(account_id ) from(select top 5 account_id from account)子查询没起作用为什么?
我是这样理解的:因为TOP 子句用于规定要返回的记录的数目,作用于整张表,例如SELECT TOP 50 PERCENT ,只是显示整张表的一半数目,后台数据库处理还是一张表,前台查询的返回结果是不同于临时表.所以虽然你查询出前五条,但是后台数据库处理max还是作用于整张account表 .所以得到的值是整张account表中account_id的最大值.select max(account_id) from account where account_id in (select top 5 account_id from account)
sql=select * from x where Min>2 and max
select max(account_id ) from(select top 5 account_id from account)子查询没起作用为什么?
SELECT
SELECT MAX(account) AS account FROM shop 和 SELECT MAX(account) FROM shop 的区别?shop 是表名,article 是表中的一个字段名.
max.
max.
sql语句:去掉最大值,去掉最小值,算平均值SELECT AVG(Scores.Score)FROM ScoresWHERE ( ( (Scores.[ID]) = @id)AND (Score < (SELECT MAX(Score) From Scores WHERE Scores.[ID] = @id) )AND (Score > (SELECT MIN(Score) From Scores WHERE Scores.[I
列名acct_month ,acct_year,表名acct_vouch查询最大、小月,最小月要对应最小年select min(acct_month) as start_month from acct_vouch where acct_year=(select min(acct_year) from acct_vouch) select max(acct_month) as cur_month from acct_
这个SELECT是什么意思?SELECT code,MAX(timetag) from goods GROUP BY code这个SQL是什么意思,出来的分组结果是按CODE过滤并只保留最大timetag的记录吗?
这两个sql语句有什么区别,执行流程是怎么的?select max(high) from StockRecord where stockCode='a53' and tradeDate
piease.select
select()是什么?
select your
Select your
please select
Please select
select forever
select skin