Creating and Dropping Databases and Tables in MySQL

Published September 09, 2026 By Sai Sree Ram Gundepudi

CREATE DATABASE

CREATE DATABASE inventory_db;

CREATE TABLE

CREATE TABLE products (
  id INT PRIMARY KEY,
  name VARCHAR(100),
  price DECIMAL(10,2)
);

DROP TABLE

DROP TABLE products;

DROP DATABASE

DROP DATABASE inventory_db;

Was this solution helpful?

Your feedback helps improve our technical knowledge repository.

Share this article