Tags
Complex SQL Challenges, Complex TSQL Challenge, Interview Qs.SQL SERVER Questions, Interview questions on Joins, Interview Questions on SQL, InterviewQuestions, InterviewQuestions for SQL, Joins, Joins Interview questions, Joins Puzzle, Learn complex SQL, Learn SQL, Learn T-SQL, PL/SQL Challenges, Puzzles, Queries for SQL Interview, SQL, SQL 2012, SQL 2014, SQL 2014 Interview Questions, SQL Challenge, SQL Challenges, SQL Joins, SQL pl/sql puzzles, SQL Puzzles, SQL Queries, SQL SERVER Interview questions, SQL Skills, SQL Sudoku, SQLSERVER, T SQL Puzzles, T-SQL Challenge, Tough SQL Challenges, Tough SQL Puzzles, TSQL, TSQL Challenge, TSQL Challenges, TSQL Interview questions, TSQL Queries
T-SQL Output Query | [ The JOIN Puzzle – Part 3 ]
–Let’s say we have 2 table TestJoins3 and TestJoins4. Both the tables having only one ID column. Here you have to provide the output of the queries given below. Before that please go through the input data below.
-- --Query 1 SELECT t1.ID , t2.ID FROM [dbo].[TestJoins3] t1 INNER JOIN [dbo].[TestJoins4] t2 ON t1.ID = t2.ID --Query 2 SELECT t1.ID , t2.ID FROM [dbo].[TestJoins3] t1 LEFT OUTER JOIN [dbo].[TestJoins4] t2 ON t1.ID = t2.ID --Query 3 SELECT t1.ID , t2.ID FROM [dbo].[TestJoins3] t1 RIGHT OUTER JOIN [dbo].[TestJoins4] t2 ON t1.ID = t2.ID --Query 4 SELECT t1.ID , t2.ID FROM [dbo].[TestJoins3] t1 FULL OUTER JOIN [dbo].[TestJoins4] t2 ON t1.ID = t2.ID -- |
Please leave a comment if you need solution to the above puzzle
Keep Learning
You must be logged in to post a comment.