1 / 9

SQL Sever “Denali” Novità della clausola ORDER BY

User Group Italiano SQL Server. Speaker: Francesco Milano. Email: contact@francescomilano.it. SQL Sever “Denali” Novità della clausola ORDER BY. Speaker. Consulente freelance in ambito .NET e SQL Server Membro UGISS http://community.ugiss.org/blogs/fmilano/default.aspx.

teresa
Download Presentation

SQL Sever “Denali” Novità della clausola ORDER BY

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. User Group Italiano SQL Server Speaker: Francesco Milano Email: contact@francescomilano.it SQL Sever “Denali” Novitàdellaclausola ORDER BY

  2. Speaker Consulente freelance in ambito .NET e SQL Server Membro UGISS • http://community.ugiss.org/blogs/fmilano/default.aspx Francesco Milano UGISS - User Group Italiano SQL Server

  3. Agenda • Introduzione a OFFSET e FETCH • Versione SQL Server e database utilizzato • Sintassi • Come si usano • Esempio di paging • OFFSET/FETCH vs TOP UGISS - User Group Italiano SQL Server

  4. Introduzione a OFFSET e FETCH SQL Server “Denali” CTP3 • https://www.microsoft.com/betaexperience/pd/SQLDCTP3CTA/enus/ Database AdventureWorks2008R2 • http://msftdbprodsamples.codeplex.com/releases/view/55330 Versione SQL Server e database utilizzato UGISS - User Group Italiano SQL Server

  5. Introduzione a OFFSET e FETCH Sintassi http://msdn.microsoft.com/en-us/library/ms188385(v=sql.110).aspx ORDER BY order_by_expression [ COLLATE collation_name ]     [ ASC | DESC ]      [ ,...n ] [ <offset_fetch> ] <offset_fetch> ::= { OFFSET { integer_constant| offset_row_count_expression} { ROW | ROWS }      [ FETCH { FIRST | NEXT } {integer_constant| fetch_row_count_expression} { ROW | ROWS } ONLY ] } UGISS - User Group Italiano SQL Server

  6. Introduzione a OFFSET e FETCH Come siusano SELECT at.AddressTypeID AS ID, at.Name FROM Person.AddressType AS at ORDER BY at.Name; SELECT at.AddressTypeID AS ID, at.Name FROM Person.AddressType AS at ORDER BY at.Name OFFSET 2 ROWS FETCH FIRST 3 ROWS ONLY; OFFSET FETCH UGISS - User Group Italiano SQL Server

  7. Esempio di paging • SQL Server 2008 • Denali UGISS - User Group Italiano SQL Server

  8. OFFSET/FETCH vs TOP • TOP: controindicazioni • Sintassi può essere fuorviante • Non richiede necessariamente la clausola ORDER BY • Non permette di "saltare" dei record • Non è standard Si consiglia di utilizzare OFFSET/FETCH al posto di TOP! UGISS - User Group Italiano SQL Server

  9. Novità della clausola ORDER BY Presentazione e demo • http://www.ugiss.org Informazioni sul prodotto SQL Server • http://www.microsoft.com/italy/sql • http://www.microsoft.com/sql Supporto sviluppo ed professionisti IT • http://www.microsoft.com/technet/prodtechnol/sql • http://msdn.microsoft.com/sql Comunità SQL Server • http://www.ugiss.org Newsgroups pubblici via NTTP • microsoft.public.it.sql • microsoft.public.sqlserver.* Newsgroups pubblici via WEB • http://www.microsoft.com/italy/communities/newsgroups/default.mspx • http://www.microsoft.com/technet/community/newsgroups/server/sql.mspx Formazione • http://www.microsoft.com/italy/traincert Risorse Generiche UGISS - User Group Italiano SQL Server

More Related