比如
Create Function test()
returns table
as
return
select * from t
order by t1这样为什么编译不通过,(The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP or FOR XML is also specified.)
为什么这里不能用order by?
Create Function test()
returns table
as
return
select * from t
order by t1这样为什么编译不通过,(The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP or FOR XML is also specified.)
为什么这里不能用order by?
returns table
as
return
select top 100 percent * from t
order by t1
order by t1是可以排序,但是到外面select * from test()出来的结果集还是没有排序,
求教为什么?