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 is sql server locking?
What is user-defined function?
How does stuff differ from the replace function?
what are defaults? Is there a column to which a default can't be bound? : Sql server database administration
What are the system database in sql server 2008?
What are points to remember while using the fillfactor argument?
How to fetch the next row from a cursor with a "fetch" statement?
List layers of abstraction microsoft architectured to provide relational db through cloud platform ?
Suppose we have a table "MyTable" containing 10 rows, what query should be executed to update the odd rows "Salary" as 9000?
What is store procedure? How do they work? When do you use?
What are the different types of data sources in ssrs?
Explain how you can configure a running aggregate in SSRS?
What is the stuff and how does it differ from the replace function?
What is function of master database?
What is SQL Azure?