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 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


Please Help Members By Posting Answers For Below Questions

Name 3 of the features that the sql server built-in function loginproperty performs on standard logins? : sql server security

1089


What are the built in functions in sql server?

983


Explain datetime2 data type in sal server 2008?

902


What are date and time data types in ms sql server?

1089


State the difference between local and global temporary tables?

1115


You want to implement the many-to-many relationship while designing tables. How would you do it?

997


What is the difference between stored procedure and user defined functions?

1188


What is cube dimension? : sql server analysis services, ssas

998


what is a schema in sql server 2005? : Sql server database administration

1022


What is surrogate key? : sql server analysis services, ssas

1104


Define full outer join?

951


What does indexation mean?

973


Explain a differential backup?

1007


What is stored procedures?

1027


Which data types generate inaccurate results if used with an = or <> comparison in a where clause of a sql statement?

1058