You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 25, 2020. It is now read-only.
Ricky Tobing edited this page Aug 17, 2013
·
3 revisions
UNION in DbQuery basically combining two SELECT Statements together.
To perform a UNION do the following:
IQuery.SelectleftSelect = db.get("Student").select().columns("Name");
Cursorcursor = db.get("Employee").union(leftSelect)
.select().columns("Name").query();
// SQL: // SELECT Name FROM Student // UNION // SELECT Name FROM Employee
To perform a UNION ALL do the following:
IQuery.SelectleftSelect = db.get("Student").select().columns("Name");
Cursorcursor = db.get("Employee").unionAll(leftSelect)
.select().columns("Name").query();
// SQL: // SELECT Name FROM Student // UNION ALL// SELECT Name FROM Employee