Enum TableCollectionType

All Implemented Interfaces:
Serializable, Comparable<TableCollectionType>, Constable

public enum TableCollectionType extends Enum<TableCollectionType>
Enumerates the collection type of a table: MULTISET allows duplicates and SET does not.

This feature is supported in Teradata, which originally required rows in a table to be unique, and later added the MULTISET keyword to its CREATE TABLE command to allow the duplicate rows.

In other databases and in the SQL standard, MULTISET is the only supported option, so there is no explicit syntax.

  • Enum Constant Details


      public static final TableCollectionType UNSPECIFIED
      Table collection type is not specified.

      Defaults to MULTISET in ANSI mode, and SET in Teradata mode.

    • SET

      public static final TableCollectionType SET
      Duplicate rows are not permitted.

      public static final TableCollectionType MULTISET
      Duplicate rows are permitted, in compliance with the ANSI SQL:2011 standard.
  • Method Details

    • values

      public static TableCollectionType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static TableCollectionType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      name - the name of the enum constant to be returned.
      the enum constant with the specified name
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null