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

# SQL-011: Insert menu security user

Inserts a new record associating an individual user with a security-group into the `MENU_SECURITY_USER` table. The primary key is generated inline via `MENU_SECURITY_USER_SEQ.NEXTVAL` in the SQL (no separate sequence query).

## Classification

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

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:SecurityGroupTxt` | Input | String** | 255 | Security group text bound from `SecurityGroupTxt`. |
| `:MenuUser` | Input | String** | 30 | User login bound from `MenuUser`. |
| `:MenuUserID` | Input | String** | 11 | Employee ID bound from `m_MenuUserID`. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [MENU_SECURITY_USER](../database-tables.md#menu-security-user) | INSERT | `MENU_SECURITY_USER_SEQ_NUM`, `SECURITY_GROUP_TXT`, `MENU_USER`, `MENU_USER_EMPLID` |

## Sample SQL

```sql
Insert into MENU_SECURITY_USER (
    MENU_SECURITY_USER_SEQ_NUM, SECURITY_GROUP_TXT,
    MENU_USER, MENU_USER_EMPLID
) Values (
    MENU_SECURITY_USER_SEQ.NEXTVAL, :SecurityGroupTxt,
    :MenuUser, :MenuUserID
)
```

## 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\clsMenuSecurityUser.vb`
