# Creating and Dropping Table
+ `CREATE TABLE [IF NOT EXISTS] {table_name} ...` 
+ Once tables are created, their definitions are saved in `information_schema.tables`  
+ Discard a table: `DROP TABLE [IF EXISTS] {table_name}`  
+ Delete all data in the table: `TRUNCATE TABLE {table_name}` 

```
USE `universe`;
DROP TABLE IF EXISTS `stars`;
CREATE TABLE `stars` (
  `id` BIGINT AUTO_RANDOM,
  `name` CHAR(20) NOT NULL DEFAULT '',
  `mass` FLOAT NOT NULL DEFAULT 0.0 COMMENT '10**24 kg',
  `density` INT NOT NULL DEFAULT 0 COMMENT 'kg/m**3',
  `gravity` DECIMAL(20,4) NOT NULL DEFAULT 0.0 COMMENT 'm/s**2',
  `escape_velocity` DECIMAL(8,1) DEFAULT NULL COMMENT 'km/s',
  `mass_conversion_rate` INT DEFAULT NULL COMMENT '10**6 kg/s',
  `spectral_type` CHAR(8) NOT NULL DEFAULT '',
  `distance_from_earth` FLOAT COMMENT 'light year',
  `discover_date` DATETIME DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY (`name`));
```

------------------------------------------------------------
The `CREATE TABLE` statement creates a new table in the selected database, similar to the `CREATE TABLE` statement in MySQL.

The `DROP TABLE` statement drops a table from the currently selected database. If the table does not exist, an error is reported unless the `IF EXISTS` modifier is used.

To delete a regular table or a temporary table, use the following:
- `DROP TEMPORARY TABLE` can only drop local temporary tables.
- `DROP GLOBAL TEMPORARY TABLE` can only drop global temporary tables.
- `DROP TABLE` can drop permanent tables or temporary tables.

Temporary tables will be explained later in this course.