---
title: "SQL-010: Insert menu security"
summary: Inserts a new menu-item to security-group association into MENU_SECURITY.
status: draft
owner: SAIF
last_reviewed: 2026-07-24
library: SAIF.Business.Menu
reference_type: package
---

# SQL-010: Insert menu security

Inserts a new record associating a menu item with a security-group string into the `MENU_SECURITY` table. The primary key is obtained beforehand via [SQL-004](SQL-004-saif-business-menu.md). `UPDATE_DATE` is set to `SYSDATE`.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-010 |
| **Operation type** | Create |
| **Execution method** | Inline SQL |
| **Database** | Oracle |
| **Schema** | `[unqualified]**` |
| **Command type** | Text |
| **Business object** | `clsMenuSecurity` |
| **Criteria property** | `InsertSQL` |
| **Lifecycle method** | `BeforeInsert` / `AfterInsert` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:MenuSecuritySeqNum` | Input | Decimal** | N/A | Primary key bound from `MenuSecuritySeqNum`. |
| `:MenuItemSeqNum` | Input | Decimal** | N/A | Menu item FK bound from `MenuItemSeqNum`. |
| `:SecurityGroup` | Input | String** | 255 | Security group tag bound from `SecurityGroup`. |
| `:UserId` | Input | String** | 30 | Update user bound from `DataPortalInfo.UserID`. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [MENU_SECURITY](../database-tables.md#menu-security) | INSERT | `MENU_SECURITY_SEQ_NUM`, `MENU_ITEM_SEQ_NUM`, `SECURITY_GROUP_TXT`, `UPDATE_DATE`, `UPDATE_USER` |

## Sample SQL

```sql
Insert into MENU_SECURITY (
    MENU_SECURITY_SEQ_NUM, MENU_ITEM_SEQ_NUM,
    SECURITY_GROUP_TXT, UPDATE_DATE, UPDATE_USER
) Values (
    :MenuSecuritySeqNum, :MenuItemSeqNum,
    :SecurityGroup, SYSDATE, :UserId
)
```

## Operations and processes
- [Menu authorization data lookup](../operations/menu-authorization-data-lookup.md)


## Business rules
- [BR-MNU-02: DML row-count enforcement](../business-rules.md#br-mnu-02-dml-row-count-enforcement)


> **Note:** Statements marked with `*` were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with `**` could not be confirmed; treat as unknown until verified.

## Sources
- `Business\SAIF.Business.Menu\clsMenuSecurity.vb`
