# Class LegacySQLTypeName (2.65.0)

2.65.0 (latest) 2.62.0 2.61.0 2.60.0 2.59.0 2.58.0 2.57.2 2.56.0 2.55.3 2.54.2 2.53.0 2.52.0 2.51.0 2.50.1 2.49.0 2.48.1 2.47.0 2.46.0 2.45.0 2.44.0 2.43.3 2.42.3 2.41.0 2.40.3 2.39.1 2.38.2 2.37.2 2.36.0 2.35.0 2.34.2 2.33.2

    public final class LegacySQLTypeName extends StringEnumValue

A type used in legacy SQL contexts. NOTE: some contexts use a mix of types; for example, for
queries that use standard SQL, the return types are the legacy SQL types.
See Also: <https://cloud.google.com/bigquery/data-types>

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> com.google.cloud.StringEnumValue \> LegacySQLTypeName

## Inherited Members

com.google.cloud.StringEnumValue.equals(java.lang.Object) com.google.cloud.StringEnumValue.hashCode() com.google.cloud.StringEnumValue.name() com.google.cloud.StringEnumValue.toString() [Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Static Fields

### BIGNUMERIC

    public static final LegacySQLTypeName BIGNUMERIC

A decimal value with 76+ digits of precision (the 77th digit is partial) and 38 digits of scale

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.LegacySQLTypeName` |   |

### BOOLEAN

    public static final LegacySQLTypeName BOOLEAN

A Boolean value (true or false).

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.LegacySQLTypeName` |   |

### BYTES

    public static final LegacySQLTypeName BYTES

Variable-length binary data.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.LegacySQLTypeName` |   |

### DATE

    public static final LegacySQLTypeName DATE

Represents a logical calendar date. Note, support for this type is limited in legacy SQL.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.LegacySQLTypeName` |   |

### DATETIME

    public static final LegacySQLTypeName DATETIME

Represents a year, month, day, hour, minute, second, and subsecond (microsecond precision).
Note, support for this type is limited in legacy SQL.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.LegacySQLTypeName` |   |

### FLOAT

    public static final LegacySQLTypeName FLOAT

A 64-bit IEEE binary floating-point value.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.LegacySQLTypeName` |   |

### GEOGRAPHY

    public static final LegacySQLTypeName GEOGRAPHY

Represents a set of geographic points, represented as a Well Known Text (WKT) string.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.LegacySQLTypeName` |   |

### INTEGER

    public static final LegacySQLTypeName INTEGER

A 64-bit signed integer value.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.LegacySQLTypeName` |   |

### INTERVAL

    public static final LegacySQLTypeName INTERVAL

Represents duration or amount of time.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.LegacySQLTypeName` |   |

### JSON

    public static final LegacySQLTypeName JSON

Represents JSON data

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.LegacySQLTypeName` |   |

### NUMERIC

    public static final LegacySQLTypeName NUMERIC

A decimal value with 38 digits of precision and 9 digits of scale. Note, support for this type
is limited in legacy SQL.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.LegacySQLTypeName` |   |

### RANGE

    public static final LegacySQLTypeName RANGE

Represents a contiguous range of values.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.LegacySQLTypeName` |   |

### RECORD

    public static final LegacySQLTypeName RECORD

A record type with a nested schema.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.LegacySQLTypeName` |   |

### STRING

    public static final LegacySQLTypeName STRING

Variable-length character (Unicode) data.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.LegacySQLTypeName` |   |

### TIME

    public static final LegacySQLTypeName TIME

Represents a time, independent of a specific date, to microsecond precision. Note, support for
this type is limited in legacy SQL.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.LegacySQLTypeName` |   |

### TIMESTAMP

    public static final LegacySQLTypeName TIMESTAMP

Represents an absolute point in time, with microsecond precision.

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.LegacySQLTypeName` |   |

## Static Methods

### legacySQLTypeName(StandardSQLTypeName type)

    public static LegacySQLTypeName legacySQLTypeName(StandardSQLTypeName type)

Converts StandardSQLTypeName to LegacySQLTypeName

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `type` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.StandardSQLTypeName` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.LegacySQLTypeName` |   |

### valueOf(String constant)

    public static LegacySQLTypeName valueOf(String constant)

Get the LegacySQLTypeName for the given String constant, and allow unrecognized values.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `constant` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.LegacySQLTypeName` |   |

### valueOfStrict(String constant)

    public static LegacySQLTypeName valueOfStrict(String constant)

Get the LegacySQLTypeName for the given String constant, and throw an exception if the constant
is not recognized.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `constant` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.LegacySQLTypeName` |   |

### values()

    public static LegacySQLTypeName[] values()

Return the known values for LegacySQLTypeName.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.LegacySQLTypeName[]` |   |

## Methods

### getStandardType()

    public StandardSQLTypeName getStandardType()

Provides the standard SQL type name equivalent to this type name.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.StandardSQLTypeName` |   |