# Variable except`Const`

except: SQLiteCreateSetOperatorFn

Adds `except` set operator to the query.

Calling this method will retrieve all unique rows from the left query, except for the rows that are present in the result set of the right query.

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

#### Example

    // Select all courses offered in department A but not in department B
    import { except } from 'drizzle-orm/sqlite-core'

    await except(
      db.select({ courseName: depA.courseName }).from(depA),
      db.select({ courseName: depB.courseName }).from(depB)
    );
    // or
    await db.select({ courseName: depA.courseName })
      .from(depA)
      .except(
        db.select({ courseName: depB.courseName }).from(depB)
      );

- 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:569