1 / 12

sql BEGINEER Level- 3 Sub-level-2 Version-1.0 by: ars

sql BEGINEER Level- 3 Sub-level-2 Version-1.0 by: ars. Agenda : USING TOP and TOP PERCENT. SqlServerSchool.com. S S S. Data Introduction. Seven Different People in the House. Hi I am Alok. My Id is 1 and date of birth is 15/Aug/1980.

soren
Download Presentation

sql BEGINEER Level- 3 Sub-level-2 Version-1.0 by: ars

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. sqlBEGINEER Level- 3Sub-level-2Version-1.0by: ars Agenda : USING TOP and TOP PERCENT Slides by SqlServerSchool.com

  2. SqlServerSchool.com SSS Slides by SqlServerSchool.com

  3. Data Introduction Seven Different People in the House. Hi I am Alok. My Id is 1 and date of birth is 15/Aug/1980 Hi I am Aman and my Id is 4 and date of birth is 16/Dec/1980 Hi I am Shree and my Id is 7 and date of birth is 20/Jan/1989 Hi I am Manish. My Id is 2 and date of birth is 20/Jan/1985 Hi I am Chandra. My Id is 5 and date of birth is 17/Jan/1980 Hi I am Ambrish. My Id is 3 and date of birth is 25/Nov/1975 Hi I am Shivam. My Id is 6 and date of birth is 18/Jan/1999 Skip Current Page >> Slides by SqlServerSchool.com

  4. Keyword And Term Introduction • Input Data: Data Stored in Customer Table • Output Data:Data to show when requirement gets • filled (or data to show as Output). Or Expected OutputOr Output Imagination • Reqstands for “Requirement” • T-SQL stands for “Sql Server Executable code” Slides by SqlServerSchool.com

  5. TIME SAVER TIPSFollowing are Concept slides to examine whether you require this course study or not… Slides by SqlServerSchool.com

  6. Concept 1 : Select Top Some records from Table Input Data Output Data SELECT TOP 2 all the information FROM CUSTOMER in descending order of Name SELECT TOP 2 * FROM CUSTOMER ORDER BY Name DESC Slides by SqlServerSchool.com

  7. Concept 2 : Select Top Some Percent records from Table Input Data Output Data SELECT TOP 75 PERCENT all the information FROM CUSTOMER SELECT TOP 75 PERCENT * FROM CUSTOMER Slides by SqlServerSchool.com

  8. If you are able to answer all quick check correctly then you don’t require this course study…If you proceed with course study then at end of study always go through quick check slides for confirm you understood this courseware correct ? Thanks, ARS Slides by SqlServerSchool.com

  9. CONCEPT 1 Slides by SqlServerSchool.com

  10. How to fetch TOP N records from the customer table- Effort-1 Input Data Output Data REQ: SELECT TOP 3 all the information FROM CUSTOMER REQ: SELECT TOP 5 all the information FROM CUSTOMER REQ: SELECT TOP 2 all the information FROM CUSTOMER in ascending order of Name REQ: SELECT TOP 2 all the information FROM CUSTOMER in descending order of Name T-SQL: SELECT TOP 3 * FROM CUSTOMER T-SQL: SELECT TOP 5 * FROM CUSTOMER T-SQL: SELECT TOP 2 * FROM CUSTOMER ORDER BY Name ASC T-SQL: SELECT TOP 2 * FROM CUSTOMER ORDER BY Name DESC You learned, Fetching TOP N records from the customer table. Note: N having values 1 or more… Slide by SqlServerSchool.com

  11. CONCEPT 2 Slides by SqlServerSchool.com

  12. How to fetch TOP N PERCENT records from the customer table- Effort-1 Input Data Output Data REQ: SELECT TOP 50 PERCENT all the information FROM CUSTOMER REQ: SELECT TOP 75 PERCENT all the information FROM CUSTOMER T-SQL: SELECT TOP 50 PERCENT * FROM CUSTOMER SQL: SELECT TOP 75 PERCENT * FROM CUSTOMER You learned, Fetching TOP N PERCENT records from the customer table. Note: N having values 1 or more… Slide by SqlServerSchool.com

More Related