Creating and Dropping Databases and Tables in MySQL

Published July 26, 2025 By Sai Sree Ram Gundepudi

Create a Database

CREATE DATABASE school;

Create a Table

CREATE TABLE students (
  id INT PRIMARY KEY,
  name VARCHAR(100),
  age INT
);

Drop

DROP DATABASE school;
DROP TABLE students;

Was this solution helpful?

Your feedback helps improve our technical knowledge repository.

Share this article