ガーデニア
9.6K posts

ガーデニア
@gardenoides
asalkan niat baik, pasti ada jalan.



Tips n trick excel ga semua orang tau nih guys!

💚 antara bahasa inggris, excel, sama bahasa mandarin, mending belajar yang mana dulu ya?



gilaaa, 15 ribu likes 😭😭. aku aman kok, gak ditambahin kerjaan tapi disuruh ngajarin pivot aja hari ini 🙏. kalo di excel, ALT adalah kunci. Tinggal pencet ALT, nanti ada begini begini tapi gak langsung jago ya, harus banyak banyak pake excel 😭🙏









qrt tweet ini dengan ayat Quran yang jadi pegangan hidupmu?

Moms have it tough in every world IG📸 : akarare


Now, let’s move to the next topic: 🔥 ✅ Transactions (COMMIT, ROLLBACK & SAVEPOINT) One of the most important real-world SQL concepts 💰 🧠 1. What is a Transaction? A Transaction is a group of SQL operations executed as a single unit 👉 Either ALL operations succeed 👉 Or ALL fail Think like bank transfer 💳👇 - Money deducted from Account A - Money added to Account B If one fails → everything should reverse 💯 ⚡ 2. ACID Properties Atomicity All or nothing Consistency Data stays valid Isolation Transactions don’t interfere Durability Saved permanently after commit ⚡ 3. COMMIT 👉 Saves changes permanently UPDATE accounts SET balance = balance - 1000 WHERE acc_id = 1; COMMIT; ✔ Changes permanently saved ❌ 4. ROLLBACK 👉 Undo changes if something goes wrong UPDATE accounts SET balance = balance - 1000 WHERE acc_id = 1; ROLLBACK; ✔ Reverts changes 🔥 5. Transaction Example START TRANSACTION; UPDATE accounts SET balance = balance - 1000 WHERE acc_id = 1; UPDATE accounts SET balance = balance + 1000 WHERE acc_id = 2; COMMIT; ✔ Money transfer completed safely ⚡ 6. SAVEPOINT 👉 Create checkpoint inside transaction START TRANSACTION; UPDATE employees SET salary = salary + 5000 WHERE department = 'IT'; SAVEPOINT salary_updated; DELETE FROM employees WHERE emp_id = 101; ROLLBACK TO salary_updated; COMMIT; ✔ Undo only deletion, keep salary update 🎯 7. Practice Tasks 1. Start a transaction 2. Update employee salary 3. Commit transaction 4. Rollback transaction 5. Use savepoint and rollback to savepoint ⚡ Mini Challenge 🔥 👉 Transfer ₹5000 between two accounts using transaction ✅ Solution: START TRANSACTION; -- Deduct money from sender UPDATE accounts SET balance = balance - 5000 WHERE acc_id = 1; -- Add money to receiver UPDATE accounts SET balance = balance + 5000 WHERE acc_id = 2; COMMIT; 🧠 How It Works 1️⃣ Transaction starts 2️⃣ ₹5000 deducted from Account 1 3️⃣ ₹5000 added to Account 2 4️⃣ COMMIT saves both changes permanently Without transactions: ❌ Data corruption possible Transactions are critical in: 👉 Banking 👉 E-commerce 👉 Payment systems 💯 Double Tap ❤️ For More (Save this later)


















