how to write the query to select the rows are in the order
of either 1,3,5,7... or 2,4,6,8,...
Answer Posted / leo
with contactinfo as (
select contactid,firstname,row_number() over (order by
firstname)as row from person.contact
)
--select * from contactinfo where row % 2 =0
Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
Explain the types of indexes.
How do I find the port number for sql server?
How to execute a sql statement using odbc_exec()?
Write an sql query to find first weekday of the month?
What are the drawbacks of reporting in ssrs?
How does index makes search faster?
What is a group function explain with an example?
What is model database? : SQL Server Architecture
What is indexing in sql server with example?
Distinguish between nested subquery and correlated subquery?
What do you understand by user-defined function in the sql server and explain the steps to create and execute a user-defined function in the sql server?
How can we remove orphan records from a table?
How you can minimize the deadlock situation?
Explain ranking functions?
Write an SQL query to obtain the 2nd highest salary.