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

Explain what is analysis service repository?

1001


What is trigger and different types of Triggers?

1149


How can sql server instances be hidden?

981


What are points to remember while using the fillfactor argument?

971


What happens if strings are casted into wrong code pages in ms sql server?

1114


Can we add a cpu to sql server?

1018


What is a fill factor?

1090


What program is used to store the data source file?

964


Do you know what are acid properties?

1081


What is a trace frag? Where do we use it?

1100


How many types of attribute relationships are there? : sql server analysis services, ssas

1079


How to create a new table in a given schema?

1190


How to find tables without indexes?

1090


Explain indexed views and partitioned view with their syntax.

1146


Explain unique key in sql server?

1013