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 is row_number () and partition by in sql server?

1004


What are the recovery models for a database?

1057


What is difference between inner join and join?

982


How to view existing indexes on an given table using sp_help?

1054


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

1032


What are cursors? Explain the different types of cursors Enlist a few disadvantages of cursors.

1200


how will add additional conditions in sql?

1013


Do you have any idea about the tcl commands?

910


Define right outer join in sql server joins?

980


Describe triggers features and limitations?

926


Can you explain about buffer cash and log cache in sql server?

905


What is "scheduled jobs" or "scheduled tasks"?

912


Which joins are sql server default?

937


What number sorts of privileges are accessible in sql?

979


Explain optimistic and pessimistic concurrency?

927