Module org.jooq
Package org.jooq

Interface SelectOptionStep<R extends Record>

    • Method Detail

      • option

        @NotNull SelectUnionStep<R> option​(String string)
        Add a SQL Server-style query hint to the select clause.


         DSLContext create = DSL.using(configuration);
        , field2)
               .option("OPTION (OPTIMIZE FOR UNKNOWN)")

        You can also use this clause for any other database, that accepts hints or options at the same syntactic location, e.g. for DB2's isolation clause:
, field2)
               .option("WITH RR USE AND KEEP EXCLUSIVE LOCKS")

        The outcome of such a query is this:

         SELECT field1, field2 FROM table1 [option]

        For SQL Server style table hints, see Table.with(String)

        See Also:
        Table.with(String), SelectQuery.addOption(String)