Deze pagina is nog niet beschikbaar in uw eigen taal. We werken er hard aan om meer taalversies toe te voegen. Bedankt voor uw steun.

Viewing Table Creation Statements

Updated on 2024-08-19 GMT+08:00

Function

This statement is used to show the statements for creating a table.

Syntax

1
SHOW CREATE TABLE table_name;

Keywords

CREATE TABLE: statement for creating a table

Parameters

Table 1 Parameter

Parameter

Description

table_name

Table name

Precautions

The table specified in this statement must exist. Otherwise, an error will occur.

Example

Example of Spark 2.4.5:
  • Run the following command to return the statement for creating the testDB01.testTable5 table:

    SHOW CREATE TABLE testDB01.testTable5

  • Return the statement for creating the test table.
    createtab_stmt
     CREATE TABLE `testDB01`.`testTable5`(`id` INT, `age` INT, `money` DOUBLE)
    COMMENT 'test'
    ROW FORMAT SERDE 'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
    WITH SERDEPROPERTIES (
      'serialization.format' = '1'
    )
    STORED AS
      INPUTFORMAT 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
      OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
    TBLPROPERTIES (
      'hive.serialization.extend.nesting.levels' = 'true',
      'ddlUpdateTime' = '1707202585460'
    )
Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback