SELECT privilege on the source table based on which to create a table.
Syntax
- Syntax supported in versions earlier than v3.2.
- v3.2 supports specifying properties for the new table.
Parameters
TEMPORARY: Creates a temporary table. From v3.3.1, the database supports creating temporary tables in the Default Catalog. For more information, see Temporary Table.database: the database.table_name: the name of the table you want to create. For the naming conventions, see System limits.source_table_name: the name of the source table you want to copy.-
partition_desc: the partitioning method. For more information, see CREATE TABLE.
distribution_desc: the bucketing method. For more information, see CREATE TABLE.PROPERTIES: the properties of the table. All the table properties are supported. For more information, see ALTER TABLE.
Examples
Suppose there is a tableorders in database test1.
test1, create an empty table order_1 that has the same table structure as orders.
order_2 based on orders and specify properties for order_2.
table2 that has the same table structure as MySQL external table table1.