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
Can we call stored procedure in trigger?
How to start and end transact-sql statements?
What are the different types of sql server replication? : sql server replication
How to change the ownership of a schema in ms sql server?
what are the core components of SSRS?
What is a matrix in ssrs?
What do you understand by recursive stored procedures?
What are trace flags?
How do I find the query plan in sql server?
How is table type constraint applied to a table?
Create and insert into temp table in sql server?
How to create a simple user defined function in ms sql server?
What are the advantages of having an index on the sql server?
What is the order in which the sql query is executed?
Explain primary key in sql server?