Thursday, December 25, 2014

Select first half record from table in SQL server


In SQL Server, the SELECT TOP clause is used to specify the number of records to return.
It can be very useful on large tables with thousands of records. You can use the TOP clause to limit the number of rows that are returned in the result set. It’s returning a large number of records can impact on performance. 

Following these are steps to select first half records from table in SQL server.

Step1  Firstly create a table with some records in sql server 

















Step2  Write sql query for select half records

select top 50 percent * from tbl_products





No comments:

Post a Comment

Kashmir 370 and 35A : The Wound of india

क्या है जम्मू-कश्मीर में लागू धारा 370,35A पूर्ण विवरण Know about 370 act in Jammu एक बार फिर से राजनीति गलियारे में धारा 370,35A को ल...