SQLite Forum

UNION Sorts on First Field
Login
UNION requires that duplicate records be omitted, which implies a sort. UNION ALL does not require a sort and will return records in visitation order.

It is wrong to assume a specific order of records returned by a SELECT. If you require a specific order, you must provide an ORDER BY clause.