I have to display ten columns values from diffrent ten
tables.
how many joins are require?
Answer Posted / praveen mehta
There are 2 possible answers
1. No joins required
Ex:
SELECT Col1 As Col from Tab1
Union
SELECT Col2 As Col from Tab2
Union
SELECT Col1 As Col from Tab3
...
2. 9 Joins Required
Ex:
SELECT
t1.Col1,
t2.Col2,
....
FROM Tab1 t1
inner join Tab2 t2 on t1.Col1=t2.Col2
inner join Tab3 t3 on t1.Col1=t3.Col2
....
| Is This Answer Correct ? | 44 Yes | 2 No |
Post New Answer View All Answers
what are the basic functions for master, msdb, model, tempdb and resource system databases? : sql server database administration
How to handle error or exception in sql?
Do you know what guidelines should be followed to help minimize deadlocks?
What number sorts of privileges are accessible in sql?
What are trace files?
Define right outer join?
What is star, snowflake and star flake schema? : sql server analysis services, ssas
Explain throw statement in sql server 2008?
What is the tcp/ip port on which sql server runs?
How many replicas are maintained for each SQL Azure database?
What is 2nf normalization?
How to replace the Query Result 'Null Value' with a text ?
What do you need to connect php to sql server?
Can You Use A Stored Procedure To Provide Data To An Ssrs Report?
What is buffer cash and log cache in sql server?