Create a view with ORDER BY clause

前端 未结 9 1628
轻奢々
轻奢々 2020-11-30 04:42

I\'m trying to create a view with an ORDER BY clause. I have create it successfully on SQL Server 2012 SP1, but when I try to re-create it on SQL Server 2008 R2

9条回答
  •  旧时难觅i
    2020-11-30 05:12

    In order to add an ORDER BY to a View Perform the following

    CREATE VIEW [dbo].[SQLSTANDARDS_PSHH]
    AS
    
    
    SELECT TOP 99999999999999
    Column1,
    Column2
    FROM
    dbo.Table
    Order by
    Column1
    

提交回复
热议问题