Blog 4: Forms in Oracle APEX – Insert, Update, and Delete Explained

 

Introduction

Forms are one of the most important components in Oracle APEX applications. They allow users to insert, update, and delete data directly in the Oracle Database. In this blog, I explain how forms work in Oracle APEX, how CRUD operations are handled, and common issues faced by beginners.

This guide is written based on my Oracle APEX learning experience.

What is a Form in Oracle APEX?

A form in Oracle APEX is a page that displays database table data using page items. Each page item is mapped to a table column. Oracle APEX automatically handles database operations using built-in processes.

Forms help developers perform:

  • Insert (Create)

  • Update

  • Delete

operations easily.

Types of Forms in Oracle APEX

Oracle APEX provides different types of forms:

  • Form on a Table

  • Form on a View

  • Form on a SQL Query

  • Master-Detail Form

For beginners, Form on a Table is the easiest to start with.



Creating a Form in Oracle APEX (Step-by-Step)

Step 1: Create Form Page

  1. Go to App Builder

  2. Open your application

  3. Click Create Page

  4. Select Form

  5. Choose Form on a Table

  6. Select the table

  7. Click Create Page

Oracle APEX automatically creates:

  • Form region

  • Page items

  • Buttons (Create, Save, Delete)

  • Processes and validations

Insert Operation in Oracle APEX Form

  • Used to add new records

  • Occurs when primary key value is null

  • Handled automatically by Automatic Row Processing (DML)

📌 Click Create button to insert data.

Update Operation in Oracle APEX Form

  • Used to modify existing records

  • Triggered when primary key value exists

  • Uses the same DML process

📌 Click Save button to update data.

Delete Operation in Oracle APEX Form

  • Used to remove records

  • Triggered by Delete button

  • Executes delete DML process

⚠️ Delete action should be handled carefully.

Automatic Row Processing (DML)

This is the core process behind forms:

  • Automatically performs insert, update, delete

  • Uses primary key to identify rows

  • Runs on page submit

📌 You can find it under Processing → Processes.

Primary Key Importance

Primary key is mandatory for:

  • Updating records

  • Deleting records

  • Identifying rows uniquely

❌ Without primary key:

  • Data will not update

  • Errors may occur

Common Issues Faced by Beginners

  • Form not saving data (missing primary key)

  • Duplicate form field ID error

  • Page not refreshing after submit

  • Session state issues

Understanding form processes helps solve these problems.

Why Forms are Powerful in Oracle APEX

  • Minimal coding

  • Automatic DML handling

  • Secure database operations

  • Easy maintenance

  • Beginner-friendly

Conclusion

Oracle APEX forms simplify database operations by automatically handling insert, update, and delete actions. Understanding forms and their internal processes is essential for building real-world applications. This blog helps beginners get comfortable with CRUD operations in Oracle APEX.

Comments

Popular posts from this blog

Blog 3: Creating My First Oracle APEX Application – Step by Step

Blog 2: Oracle APEX Architecture