There are different Set Operators that you can use in SQL according to your needs and those are explained in this article on Scaler Topics.
scaler.com