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

How can you start sql server in different modes?

1019


How to attach adventureworkslt physical files to the server?

1160


On a windows server 2003 active – passive failover cluster, how do you find the node which is active?

1249


What is SQL Azure Federations?

114


Do you know what are acid properties?

1122


What is ms sql server reporting services?

1123


What is subreport?

144


What are the steps to process a single select statement?

988


What are various aggregate functions that are available?

1041


What are different type of Collation Sensitivity?

1046


Tell me about normalization in DBMS.

1061


What is a Join and explain its types?

1149


How does SSIS(Sql Server Integration Services) deffer from DTS(Data Transformation Services)?

1263


What is difference in performance between insert top (n) into table and using top with insert?

1119


What do you understand by coalesce in sql server?

1127