Help Center/Data Lake Insight/SQL Syntax Reference (Paris Region)/Spark SQL Syntax Reference/Checking Tables/Checking Table Creation Statements
Updated on 2025-01-22 GMT+08:00
Checking Table Creation Statements
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
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' )
Parent topic:Checking Tables
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot
