SQL Introduction
📌 Introduction to SQL
SQL (Structured Query Language) ek standard language hai jo databases ko manage karne ke liye use hoti hai.
Iska use mostly **data retrieval, insertion, updating, aur deletion** ke liye hota hai.
🔹 Full Form of SQL
SQL stands for **"Structured Query Language"**.
🔥 Features of SQL
- ✅ Database se data retrieve karne ke liye use hota hai
- ✅ Table me data insert, update, aur delete kar sakte hain
- ✅ SQL multiple database systems ke saath compatible hai (MySQL, PostgreSQL, SQLite, SQL Server)
- ✅ Transactions aur security features provide karta hai
📌 Basic SQL Commands
To create a new database in SQL:
CREATE DATABASE mydatabase;
To show all databases:
SHOW DATABASES;
To create a new table:
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(50),
email VARCHAR(100) UNIQUE
);
To insert data into the table:
INSERT INTO users (name, email) VALUES ('John Doe', 'john@example.com');
To retrieve all records from the table:
SELECT * FROM users;