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
What is partition, how will you implement it? : sql server analysis services, ssas
Why we should not use triggers?
What is NOT NULL Constraint in sql server 2012?
How to test subquery results with the exists operator?
What is scrollable cursor?
If you lose rights to your sql server instance what are the options to connect to sql server instance? : sql server security
What options are available to audit login activity? : sql server security
How do I know if localdb is running?
Explain error handling in ssis?
What is the difference between ddl and dml?
What are the character string functions supported by sql server 2005?
Explain transaction server explicit transaction?
How to convert a numeric expression from one data type to another?
What is a join in sql?
Are there any preferred steps that need to be taken care of before starting the installation of sql server 2000?