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
Explain what is raid and what are different types of raid levels?
where can you add custom error messages to sql server? : Sql server administration
Why we use trigger in sql server with example?
What is table-valued sub query?
What happens if null values are involved in boolean operations?
Explain the properties of the relational tables?
What are the properties of the transactions?
How to create an multi-statement table-valued function?
Describe in brief databases and sql server databases architecture.
Explain primary key?
What is sql server locking?
How to drop existing views from a database in ms sql server?
How do triggers work?
What is the difference between mysql and mysqli?
Explain logical operators in sql server?