Module org.jooq
Package org.jooq

Interface Table<R extends Record>

Type Parameters:
R - The record type associated with this table
All Superinterfaces:
Fields, GroupField, Named, Qualified, QueryPart, RecordQualifier<R>, SelectField<R>, SelectFieldOrAsterisk, Serializable, TableLike<R>, Typed<R>
All Known Subinterfaces:
CommonTableExpression<R>, JSONTableColumnPathStep, JSONTableColumnsStep, QOM.CrossApply<R>, QOM.CrossJoin<R>, QOM.DataChangeDeltaTable<R>, QOM.DerivedTable<R>, QOM.Dual, QOM.FullJoin<R>, QOM.GenerateSeries<T>, QOM.HintedTable<R>, QOM.Join<R>, QOM.JoinTable<R,J>, QOM.Lateral<R>, QOM.LeftAntiJoin<R>, QOM.LeftJoin<R>, QOM.LeftSemiJoin<R>, QOM.LinkedTable<R>, QOM.NaturalFullJoin<R>, QOM.NaturalJoin<R>, QOM.NaturalLeftJoin<R>, QOM.NaturalRightJoin<R>, QOM.OuterApply<R>, QOM.QualifiedJoin<R,J>, QOM.RightJoin<R>, QOM.RowsFrom, QOM.StraightJoin<R>, QOM.TableAlias<R>, QOM.Values<R>, QOM.WithOrdinalityTable<R>, QOM.WithTable<R>, TableOnConditionStep<R>, TableOptionalOnStep<R>, XMLTableColumnPathStep, XMLTableColumnsStep
All Known Implementing Classes:
CustomTable, TableImpl

public non-sealed interface Table<R extends Record> extends TableLike<R>, RecordQualifier<R>, GroupField, SelectField<R>
A table.

Like Field, a Table is a basic building block of any Query, as they all operate on at least one table. There are many different types of tables, including:


 // Assuming import static org.jooq.impl.DSL.*;

    .from(ACTOR) // Table reference

Instances can be created using DSL.table(Name) and overloads.

Using table references as field expressions

Table references can be used like Field in queries. This includes:

  • A GroupField is an expression that is used in a Select query's GROUP BY clause.
  • A SelectField is an expression that is used in a Select query's SELECT clause, or in a DML query's RETURNING clause, such as INSERT … RETURNING.

Other types of Table cannot be used this way, even if the type system cannot prevent this.

Lukas Eder