MySQL
TRUNCATE in MySQL
1. Definition TRUNCATE is a DDL (Data Definition Language) command used to remove all rows from a table. Unlike DELETE, it is faster and uses less system resources, because: It doesn’t...
TRUNCATE in MySQL
1. Definition TRUNCATE is a DDL (Data Definition Language) command used to remove all rows from a table. Unlike DELETE, it is faster and uses less system resources, because: It doesn’t...
MySQL Data Types
MySQL data types are grouped into 3 main categories: 🔹 1. Numeric Data Types (A) Integer Types Type Storage Range (Signed) Example TINYINT 1 byte -128 to 127 Age, flags SMALLINT...
MySQL Data Types
MySQL data types are grouped into 3 main categories: 🔹 1. Numeric Data Types (A) Integer Types Type Storage Range (Signed) Example TINYINT 1 byte -128 to 127 Age, flags SMALLINT...
MySQL Operators and Clauses
🔹 1. Operators in MySQL (A) Arithmetic Operators Used for calculations. SELECT 10 + 5; -- 15 SELECT 10 - 5; -- 5 SELECT 10 * 5; -- 50 SELECT 10...
MySQL Operators and Clauses
🔹 1. Operators in MySQL (A) Arithmetic Operators Used for calculations. SELECT 10 + 5; -- 15 SELECT 10 - 5; -- 5 SELECT 10 * 5; -- 50 SELECT 10...
MySQL Triggers
1. What is a Trigger? A trigger is a stored database object that automatically executes (fires) when a specified event occurs on a table. Events can be: INSERT UPDATE DELETE 👉...
MySQL Triggers
1. What is a Trigger? A trigger is a stored database object that automatically executes (fires) when a specified event occurs on a table. Events can be: INSERT UPDATE DELETE 👉...
MySQL Indexes
1. What is an Index? An index is like a book’s index: it helps MySQL find rows faster without scanning the whole table. Technically: it is a data structure (usually B-Tree)...
MySQL Indexes
1. What is an Index? An index is like a book’s index: it helps MySQL find rows faster without scanning the whole table. Technically: it is a data structure (usually B-Tree)...
JOINS in MySQL
👉 A JOIN is used to combine rows from two or more tables based on a related column. Let’s assume we have two tables: Customers id name city 1 John Delhi...
JOINS in MySQL
👉 A JOIN is used to combine rows from two or more tables based on a related column. Let’s assume we have two tables: Customers id name city 1 John Delhi...