Documentation
    Preparing search index...

    Variable unionConst

    Adds union set operator to the query.

    Calling this method will combine the result sets of the select statements and remove any duplicate rows that appear across them.

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

    // Select all unique names from customers and users tables
    import { union } from 'drizzle-orm/sqlite-core'

    await union(
    db.select({ name: users.name }).from(users),
    db.select({ name: customers.name }).from(customers)
    );
    // or
    await db.select({ name: users.name })
    .from(users)
    .union(
    db.select({ name: customers.name }).from(customers)
    );