1️⃣ SHOW Description: Displays databases, tables, or table structure. Syntax: SHOW DATABASES; SHOW TABLES; SHOW COLUMNS FROM table_name; Example: SHOW DATABASES; SHOW TABLES; SHOW COLUMNS FROM students; Output (sample): +----------------+ | Database | +----------------+ | information_schema | | school_db | | test | +----------------+ Summary: Useful to explore existing databases and table structure. 2️⃣ USE Description: Selects a database to work with. Syntax: USE database_name; Example: USE school_db; Output (sample): Database changed Summary: Sets the default database for all subsequent operations. 3️⃣ CREATE Description: Creates databases or tables. Syntax: CREATE DATABASE database_name; CREATE TABLE table_name ( column1 datatype constraints , column2 datatype constraints , ... ); Example: CREATE DATABASE school_db; CREATE TABLE students ( id INT AUTO_INCREMENT P...
Posts
Showing posts from February, 2026