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
How to create a simple user defined function in ms sql server?
what is difference between NULL and ISNULL in SQL Server 2008?
What should be the fill factor for indexes created on tables? : sql server database administration
What are pessimistic lock and optimistic lock?
What are the triggers in sql?
What is SQL Azure Data sync?
what is an index? : Sql server database administration
What is create command?
List out different types of normalizations in sql server and explain each of them?
What do you mean by an execution plan?
Where actually sql azure database is hosted?
What do you mean by authentication modes in sql server?
What are the dis_advantages of stored procedures, triggers, indexes?
Explain what is “asynchronous” communication in sql server service broker?
How to list all dsn entries on your local machine using odbc_data_source()?