# Variable unionAll`Const`

unionAll: SQLiteCreateSetOperatorFn

Adds `union all` set operator to the query.

Calling this method will combine the result-set of the `select` statements and keep all duplicate rows that appear across them.

See docs: https://orm.drizzle.team/docs/set-operations#union-all

#### Example

    // Select all transaction ids from both online and in-store sales
    import { unionAll } from 'drizzle-orm/sqlite-core'

    await unionAll(
      db.select({ transaction: onlineSales.transactionId }).from(onlineSales),
      db.select({ transaction: inStoreSales.transactionId }).from(inStoreSales)
    );
    // or
    await db.select({ transaction: onlineSales.transactionId })
      .from(onlineSales)
      .unionAll(
        db.select({ transaction: inStoreSales.transactionId }).from(inStoreSales)
      );

- Defined in node_modules/.pnpm/drizzle-orm@0.44.6_@cloudflare+workers-types@4.20251014.0_@opentelemetry+api@1.9.0_@typ_31a6f5ca8f102af87864dd251ed08d88/node_modules/drizzle-orm/sqlite-core/query-builders/select.d.ts:517