What is the difference between UNION and UNIONALL commands in SQLServer?
The UNION command is used to select the related data from two different tables, while using the UNION command all the selected columns have to to be of the same data type.
Select EmployeeName from Employees
union
Select EmployeeName from Department
Ex :
Select EmployeeName from Employees
union all
Select EmployeeName from Department
Labels: UNION, UNIONALL commands in SQL Server
1 Comments:
The Pega Software Course teaches you to design, develop, and deploy business process automation solutions. Gain hands-on skills in low-code development to boost efficiency and career prospects.
Post a Comment
Subscribe to Post Comments [Atom]
<< Home