SQL SET Operators

Advertisements

Prev Tutorial Next Tutorial

SQL SET Operators

SQL SET Operators are behave same like mathematical sets, these sql set operators are classified into four types, which is given below;

  • Union
  • Union all
  • Minus
  • Intersect

Union

Union operator return all the value from all the table excluding dublicate values, it means it not return dublicate values.

union in sql

Example

	
SELECT emp_id FROM Employee
UNION
SELECT emp_id FROM Payment

Union all

Union all operator returns all the value from all the table including dublicate values.

Example

	
SELECT emp_id FROM Employee
UNION ALL
SELECT emp_id FROM Payment

Intersect

Intersect operator return the common value from all the varibles.

intersect in sql

Example

	
SELECT emp_id FROM Employee
INTERSECT
SELECT emp_id FROM Payment

Minus

Minus operator return the value which are not available in first table but not available in second table.

minus in sql

Example

	
SELECT emp_id FROM Employee
MINUS
SELECT emp_id FROM Payment

Prev Tutorial Next Tutorial

Advertisements

Buy This Ad Space @$20 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 9999595223

Pure VPN Privide Lowest Price VPN Just @ $1.65. Per Month with Non Detected IP Lowest Price Non Detected IP VPN

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

For Projects 9999595223

Google Advertisements


Buy Websites 9999595223

Buy College Projects with Documentation Contact on whatsapp 9999595223. Contact on: hitesh.xc@gmail.com or 9999595223 Try this Keyword C++ Programs

Advertisements