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
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 ...
How do I start sql server 2016?
How will you monitor replication latency in transactional replication? : sql server replication
How many partitions a clustered index has by default in sql server 2012?
How to turn on the mssql api module in php?
Difference between uniqe index and uniqe constraint?
What are the main sources of data?
How many types of the database links?
How to connect sql server management studio express to sql server 2005 express?
How to see existing views in ms sql server?
What is the use of “join” in sql server?
How to round a numeric value to a specific precision?
Tell me something about security and sql azure?
Why we use trigger in sql server with example?
How secure is sql server database?