table1 has 3 attributes:
country. For example with the following tuples:
John White Canada
John Smith France
Mary Smith Canada
Ben Smith Canada
Mary Black USA
I am looking for those with first name, "John", or last name "Smith", or country "US":
I want to get the result in the following order:
First those with first name, John, then those with last name smith, and last those with country US
I know that I can write the following 3 different queries and then use their output in the order I want:
I am looking for a better way.
Question1: if I use the mentioned 3 queries and find their union the order will change, right? If yes, how can I append the results?
Question2: Is there a better way?