Baizeed Rony Academy

Baizeed Rony Academy Baizeed Rony Academy is a leading Virtual ICT training service provider in Worldwide.

04/08/2025

Good night

31/07/2025

How to make Progress Bar In Oracle Apex!

24/07/2025

🔗 FOREIGN KEY with ON DELETE Options
When you define a foreign key, you can specify what should happen to the child table rows when a row in the parent table is deleted.

🧨 1. ON DELETE CASCADE
👉 Automatically deletes matching rows in the child table when the parent row is deleted.

🧯 2. ON DELETE SET NULL
👉 Automatically sets the foreign key column(s) in the child table to NULL when the parent row is deleted.

✅ Example Scenario
Let’s say we have:

A parent table: departments

A child table: employees (each employee belongs to a department)

🔧 Step-by-Step SQL Example:
🔹 Step 1: Create Parent Table

CREATE TABLE departments (
dept_id NUMBER PRIMARY KEY,
dept_name VARCHAR2(100)
);

🔹 Step 2: Create Child Table with ON DELETE CASCADE
CREATE TABLE employees (
emp_id NUMBER PRIMARY KEY,
emp_name VARCHAR2(100),
dept_id NUMBER,
CONSTRAINT emp_dept_fk FOREIGN KEY (dept_id)
REFERENCES departments(dept_id)
ON DELETE CASCADE
);

✅ Now if you delete a row from departments, all related rows in employees will be deleted automatically.

🔹 Step 3: Create Child Table with ON DELETE SET NULL
If instead, you want to keep the employee, but set dept_id to NULL when the department is deleted:

CREATE TABLE employees (
emp_id NUMBER PRIMARY KEY,
emp_name VARCHAR2(100),
dept_id NUMBER,
CONSTRAINT emp_dept_fk FOREIGN KEY (dept_id)
REFERENCES departments(dept_id)
ON DELETE SET NULL
);

✅ Now when a department is deleted, affected employees’ dept_id will become NULL.

🔍 Visual Summary:
Option Result when parent row is deleted
ON DELETE CASCADE Deletes matching child rows
ON DELETE SET NULL Sets foreign key column(s) in child to NULL

23/07/2025

Good Morning

Shout out to my newest followers! Excited to have you onboard! Hina Khan, Mohamed Elsayed
20/07/2025

Shout out to my newest followers! Excited to have you onboard! Hina Khan, Mohamed Elsayed

18/07/2025

In Oracle SQL, both CASE and DECODE are used for conditional logic, but DECODE is specific to Oracle syntax, while CASE is part of the ANSI SQL standard.

✅ DECODE – Oracle-specific

Proprietary to Oracle (not standard SQL).

Simpler syntax for equality checks.

Only works with equality conditions (can't do >, ,

18/07/2025
17/07/2025

Let's start the training today.

17/07/2025

🔶 Some Powerful Oracle-Supplied Packages Every Developer Should Know! 🔶
Oracle provides a wide range of built-in PL/SQL packages to extend functionality, automate processes, and manage tasks more efficiently.

🚀 Here are some essential Oracle-Supplied Packages:

📦 DBMS_OUTPUT – Display output from PL/SQL programs (for debugging).

📂 UTL_FILE – Read/write files from the database server.

📧 UTL_MAIL – Send emails directly from PL/SQL (SMTP support).

📢 DBMS_ALERT – Enables asynchronous communication between sessions.

🔐 DBMS_LOCK – Provides user-defined locking mechanisms.

👤 DBMS_SESSION – Control and manage user sessions.

📊 DBMS_APPLICATION_INFO – Track module, action, and client info for performance tuning.

🌐 HTP – Generate HTML content using PL/SQL (used in Oracle Web Toolkit).

⏰ DBMS_SCHEDULER – Automate jobs, scheduling PL/SQL procedures and scripts.

💡 Mastering these packages can boost your productivity, improve automation, and make your Oracle applications smarter!

17/07/2025

Address

Mirpur 10
Dhaka
1216

Alerts

Be the first to know and let us send you an email when Baizeed Rony Academy posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Contact The Business

Send a message to Baizeed Rony Academy:

Share