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 a virtual table in sql?
Differentiate between ms sql server reporting services vs crystal reports?
What do you mean by authentication modes in sql server?
What are the different types of Indexes available in SQL Server?
How many triggers are possible per table?
How do I create an extended event in sql server?
Can you explain powershell included in sql server 2008?
What is autocommit mode in sql server?
What is dirty read?
How do I delete a sql server database?
Does a server store data?
What is the difference between a primary key and a unique key? Are they the same?
What are types of scd? : sql server analysis services, ssas
Is null vs coalesce?
What is a raid and what are different types of raid configurations?