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
How many clustered indexes can be created on a table? I create a separate index on each column of a table. what are the advantages and disadvantages of this approach?
What are the essential components of sql server service broker?
What is sparse columns of sql server 2008?
How do I find the sql server instance name?
How to use subqueries in the from clause in ms sql server?
how would you troubleshoot blocking? : Sql server database administration
do views contain data ?
Do you know what guidelines should be followed to help minimize deadlocks?
What is the full meaning of dml?
What is the process of normalization?
How to delete a login name in ms sql server?
What are database states in ms sql server?
What the different topologies in which replication can be configured?
How can we improve performance by using SQL Server profiler?
How do I find the query plan in sql server?