order by子查询 [英] order by clause sub queries

查看:99
本文介绍了order by子查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么子查询中的"order by"子句必须与sql server中的"top"子句关联. :

  SELECT  [Id]
      ,[顾客]
      ,[日期]
      ,[价值]
   FROM  [myDatabase].[dbo].[客户]
  订单  BY  [日期] 

工作正常...


why the "order by" clause in sub queries must be associated with "top" clause in sql server..??

解决方案

It doesn''t:

SELECT [Id]
      ,[Customer]
      ,[date]
      ,[Value]
  FROM [myDatabase].[dbo].[Customers]
  ORDER BY [date]

Works just fine...


这篇关于order by子查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆