SHOW CREATE TABLE
S’applique à : Databricks SQL Databricks Runtime
Retourne l’instruction CREATE TABLE ou l’instruction CREATE VIEW utilisée pour créer une table ou un affichage donnés. SHOW CREATE TABLE
sur une table inexistante ou un affichage temporaire lève une exception.
Syntaxe
SHOW CREATE TABLE { table_name | view_name }
Paramètres
-
Identifie la table. Le nom ne doit pas inclure une spécification temporelle.
Exemples
> 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')