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

Answers were Sorted based on User's Feedback



I have Two table First have UserName and second is address, in address table more than value relega..

Answer / arun

use Coalesec(addrress1,address2)

Is This Answer Correct ?    6 Yes 1 No

I have Two table First have UserName and second is address, in address table more than value relega..

Answer / krishan

Please solve my problem?

Is This Answer Correct ?    4 Yes 1 No

I have Two table First have UserName and second is address, in address table more than value relega..

Answer / manoj pandey

select user_name, coalesce(address1, address2) as address
from username u
left join address a
on u.userid = a.userid


For more Interview Questions check my blog: http://sqlwithmanoj.wordpress.com/interview-questions/

Is This Answer Correct ?    3 Yes 0 No

I have Two table First have UserName and second is address, in address table more than value relega..

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

More SQL Server Interview Questions

What is mapping schema?

0 Answers  


What is measure group, measure? : sql server analysis services, ssas

0 Answers  


Do you know what is a with(nolock)?

0 Answers  


What are the difference between primary keys and foreign keys?

0 Answers  


Explain what is log shipping?

0 Answers  


Can we take the full database backup in log shipping?

0 Answers  


How to get nth highest salary from employee table.

0 Answers  


How to delete existing rows in a table?

0 Answers  


Please give me the SP for the below scenario. I have two tables named Table1 and Table2...I need to fetch record by record from Table1 and insert the record in to table2 where the value in the sno column of the table1 is even number.

4 Answers   Value Labs,


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

0 Answers  


What is the order in which the sql query is executed?

0 Answers  


What is check constraint in sql server?

0 Answers  


Categories