Skip to content

Commit 99eeafe

Browse files
authored
Updated README.md
1 parent 3bd0b69 commit 99eeafe

File tree

1 file changed

+1
-52
lines changed

1 file changed

+1
-52
lines changed

README.md

Lines changed: 1 addition & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
# 🌟 Database Management Systems - BASICS 🌟
2-
3-
<img src="https://brainalyst.in/wp-content/uploads/2022/08/Database-Management-System.jpg" />
4-
51
### Introduction 📚
62
Whether you are just starting with databases or looking to refine your skills, this repository offers comprehensive insights into designing, querying, and managing relational databases. Explore the core concepts through practical examples and detailed explanations tailored for learners and professionals alike.
73

84
---
95

106
### Contents 📋
117

8+
* *[SQL Commands](sql-commands.md)*
129
1. **Data Definition Language (DDL)**
1310
- CREATE 🛠️
1411
- ALTER ✏️
@@ -177,51 +174,3 @@ SAVEPOINT sp1;
177174
-- Rollback to the savepoint
178175
ROLLBACK TO SAVEPOINT sp1;
179176
```
180-
---
181-
182-
### Examples 📋
183-
184-
#### Creating and Managing a Database 🛠️
185-
186-
```sql
187-
-- Create a new database
188-
CREATE DATABASE company_db;
189-
190-
-- Use the new database
191-
USE company_db;
192-
193-
-- Create an employees table
194-
CREATE TABLE employees (
195-
id INT PRIMARY KEY,
196-
name VARCHAR(50),
197-
age INT,
198-
department VARCHAR(50)
199-
);
200-
201-
-- Add a new column to the employees table
202-
ALTER TABLE employees ADD salary DECIMAL(10, 2);
203-
204-
-- Insert records into the employees table
205-
INSERT INTO employees (id, name, age, department, salary) VALUES
206-
(1, 'John Doe', 30, 'HR', 60000),
207-
(2, 'Jane Smith', 25, 'Finance', 55000),
208-
(3, 'Mike Brown', 35, 'IT', 70000);
209-
210-
-- Retrieve all employees
211-
SELECT * FROM employees;
212-
213-
-- Update an employee's age
214-
UPDATE employees SET age = 31 WHERE id = 1;
215-
216-
-- Delete specific employees
217-
DELETE FROM employees WHERE age < 30;
218-
219-
-- Truncate the table
220-
TRUNCATE TABLE employees;
221-
222-
-- Drop the table
223-
DROP TABLE employees;
224-
225-
-- Drop the database
226-
DROP DATABASE company_db;
227-
```

0 commit comments

Comments
 (0)