扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:walkdan 来源:博客园 2007年10月22日
关键字: SQL Server 2005 新功能 SQL Server
declare @n int set @n = 10 select TOP(@n) * from Orders |
select * from(select OrderId, Freight, ROW_NUMBER() OVER(order by Freight) as row from Orders) a where row between 20 and 30 |
select * from(select OrderId, Freight, RANK() OVER(order by Freight) as rank from Orders) a where rank between 20 and 30 |
SET XACT_ABORT ON -- 打开 try功能 BEGIN TRY begin tran insert into Orders(CustomerId) values(-1) commit tran print 'commited' END TRY BEGIN CATCH rollback print 'rolled back' END CATCH |
WITH OrderFreight AS( select OrderId, Freight, ROW_NUMBER() OVER(order by Freight) as row from Orders ) select OrderId, Freight from OrderFreight where row between 10 and 20 |
--DataSet CustOrdersOrders(string customerID) CREATE ENDPOINT Orders_Endpoint state=started as http( path='/sql/orders', AUTHENTICATION=(INTEGRATED), ports=(clear) ) for soap( WebMethod 'CustOrdersOrders'( name='Northwind.dbo.CustOrdersOrders' ), wsdl=default, database='Northwind', namespace='http://mysite.org/' ) |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者