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 row_number () and partition by in sql server?
What are the recovery models for a database?
What is difference between inner join and join?
How to view existing indexes on an given table using sp_help?
What is database dimension? : sql server analysis services, ssas
What are cursors? Explain the different types of cursors Enlist a few disadvantages of cursors.
how will add additional conditions in sql?
Do you have any idea about the tcl commands?
Define right outer join in sql server joins?
Describe triggers features and limitations?
Can you explain about buffer cash and log cache in sql server?
What is "scheduled jobs" or "scheduled tasks"?
Which joins are sql server default?
What number sorts of privileges are accessible in sql?
Explain optimistic and pessimistic concurrency?