SQL UNION VS UNION ALL interview questions and answers || Learn SQL easy way
ฝัง
- เผยแพร่เมื่อ 7 ต.ค. 2024
- In this Video we will learn about the UNION and UNION ALL , and how we get result sets.
--UNION & UNION ALL
--ALWAYS USED ON MORE THAN 1 SELECT QUERY (MIN 2 QYERY)
--SAME NUMBER COLUMN AND SAME DATA TYPE IN BOTH SELECT
--IT MERGES DATA AND EXCLUDE DUPLICATE(UNION) ,INCLUDE THE DUPLICATE(UNION ALL)
For UNION use below select queries to understand:
SELECT 'X' FCOL
UNION
SELECT 'X' SCOL
UNION
SELECT 'Z' TCOL
For UNION ALL use below select queries to understand:
SELECT 'X' FCOL
UNION ALL
SELECT 'X' SCOL
UNION ALL
SELECT 'Z' TCOL
If you like the content and feel that this is can be helpful to someone who is new to SQL.
Please share and like the video.
#sqlinterviewquestionsandanswers #sqlinterview #sqlbeast #sqlserver #sqljoins #sqlunion #unionvsunionall #sqlbeast
One of the Best Explanation i see , Thank You 😌