MySQL Table Interaction: CRUD Operations
1️⃣ Create: Creating a Table
2️⃣ Insert: Adding Data to a Table
You can insert multiple rows at once:
3️⃣ Read: Querying Data from a Table
-
Select all rows and columns:
-
Select specific columns:
-
Filter rows with WHERE:
-
Sort results:
-
Limit the number of rows:
4️⃣ Update: Modifying Data
5️⃣ Delete: Removing Data
6️⃣ Alter Table: Modifying Table Structure
-
Add a new column:
-
Drop a column:
7️⃣ Drop Table: Delete Entire Table
Bonus: Working with PHP to Interact with Tables
Here’s a quick PHP example using MySQLi to fetch and display data:
