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 the difference between truncate and delete commands?
What is a DBMS, query, SQL?
What is normalization and denormalization in sql server?
What is difference between materialized view and view?
How to create a simple stored procedure in ms sql server?
What is difference between temp table and cte?
What are the steps you will take to improve the performance of a poor performing query?
Why truncate is ddl command?
How data can be copied from one table to another table?
What is query cost in sql server?
How to create hyperlink from returned sql query ?
How to connect a database with sql express.?
Why use update_statistics command in sql server?
What are the steps to process a single select statement?
What is sql stored procedure?