It is used to combine two or more sql statements.
Understand following points while using union
- Number of cols in each sql must be same
- Columns data type must be same at least its easy to convert them into same (eg varchar, text)
- When cols name is different, then label of first sql is print.
- You can use order by statement after at last of the last sql statements
0 Comment:
Post a Comment