Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how do we find every fifth record in a table

Answer Posted / saurabh tyagi

select id ,partcode from prt where id in
(

select case when row_number() over (order by partcode ) %
5 = 0
then row_number() over (order by
partcode)
else 0 end
from prt
)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a Select Query to display title for each group of records, which are collected with Compute Clause? Like titlefield column-A column-B ..... ..... ..... Sum ... titlefield column-A column-B ..... ..... ..... Sum ...

1986


How do I start sql server 2016?

853


How will you monitor replication latency in transactional replication? : sql server replication

1086


How many partitions a clustered index has by default in sql server 2012?

1049


How to turn on the mssql api module in php?

1011


Difference between uniqe index and uniqe constraint?

915


What are the main sources of data?

1035


How many types of the database links?

1020


How to connect sql server management studio express to sql server 2005 express?

964


How to see existing views in ms sql server?

985


What is the use of “join” in sql server?

1017


How to round a numeric value to a specific precision?

1011


Tell me something about security and sql azure?

114


Why we use trigger in sql server with example?

916


How secure is sql server database?

950