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

I have Two table First have UserName and second is address,
in address table more than value relegated to UserName
table, i want to fetch 2nd address if exist other wise 1st
address access

Answer Posted / sayali

Select u.name,coalesce(a.address2, a.address1)as Address
from Username u left join address a
on u.userid = a.userid

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what type of index will get created after executing the above statement? : Sql server database administration

971


What is truncate table?

938


Which is the main third-party tool used in sql server?

942


How many types of dimensions are there and what are they? : sql server analysis services, ssas

1066


What is mapping schema?

1027


What is sql sandbox in sql server?

1222


What is the fastest way to permanently delete a 1 million row table named customers?

1255


List the different types of joins?

1003


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

1100


Differentiate between a local and a global temporary table?

954


What is create command?

968


What is log in sql server?

1146


What is molap and its advantage? : sql server analysis services, ssas

986


SQL Server Architecture ?

2457


What is the use of group by clause?

942