Skip to content

Commit

Permalink
add draft
Browse files Browse the repository at this point in the history
  • Loading branch information
Peng-Lei committed Jan 10, 2022
1 parent 21cc5b5 commit a08a497
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion docs/sql-ref-syntax-aux-show-create-table.md
Expand Up @@ -39,7 +39,7 @@ SHOW CREATE TABLE table_identifier [ AS SERDE ]

* **AS SERDE**

Just for generating Hive DDL for a Hive SerDe table.
Generates Hive DDL for a Hive SerDe table.

### Examples

Expand All @@ -59,6 +59,25 @@ SHOW CREATE TABLE test;
'prop1' = 'value1',
'prop2' = 'value2')
+----------------------------------------------------+

SHOW CREATE TABLE test AS SERDE;
+------------------------------------------------------------------------------+
| createtab_stmt|
+------------------------------------------------------------------------------+
|CREATE TABLE `default`.`test`(
`c` INT)
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
WITH SERDEPROPERTIES (
'serialization.format' = ',',
'field.delim' = ',')
STORED AS
INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
TBLPROPERTIES (
'prop1' = 'value1',
'prop2' = 'value2',
'transient_lastDdlTime' = '1641800515')
+------------------------------------------------------------------------------+
```

### Related Statements
Expand Down

0 comments on commit a08a497

Please sign in to comment.