VISA SKAPA TABELL
Gäller för: Databricks Databricks Runtime
Returnerar CREATE TABLE-instruktionen eller CREATE VIEW-instruktionen som användes för att skapa en viss tabell eller vy. SHOW CREATE TABLE
i en tabell som inte finns eller en tillfällig vy utlöser ett undantag.
Syntax
SHOW CREATE TABLE { table_name | view_name }
Parametrar
-
Identifierar tabellen. Namnet får inte innehålla en temporal specifikation.
Exempel
> CREATE TABLE test (c INT) ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
STORED AS TEXTFILE
TBLPROPERTIES ('prop1' = 'value1', 'prop2' = 'value2');
> SHOW CREATE TABLE test;
createtab_stmt
----------------------------------------------------
CREATE TABLE `default`.`test` (`c` INT)
USING text
TBLPROPERTIES (
'transient_lastDdlTime' = '1586269021',
'prop1' = 'value1',
'prop2' = 'value2')