---
title: "SQL-010: Insert a new security-group grant"
summary: Insert a new security-group grant
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-08-17
library: SAIF.Business.Menu
reference_type: package
---

# SQL-010: Insert a new security-group grant

This statement is the `InsertSQL` implementation of `clsMenuSecurity.Criteria`, executed from `BeforeInsert` against `MENU_SECURITY`. Insert a new security-group grant.

## 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` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:MenuSecuritySeqNum` | Input | Decimal | N/A | Sequence-assigned primary key (from SQL-004) |
| `:MenuItemSeqNum` | Input | Decimal | N/A | Menu item being secured |
| `:SecurityGroup` | Input | String | 255 | Security-group name granted access |
| `:UserId` | Input | String | 30 | Acting user, trimmed and upper-cased, stamped as `UPDATE_USER` |

## 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 a new security-group grant
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

- [Create a menu item](../operations/op-menu-06-create-menu-item.md)

## Business rules

- [BR-MENU-016](../business-rules.md#br-menu-016-audit-stamp-on-insert-and-update): Audit stamp on insert and update
- [BR-MENU-020](../business-rules.md#br-menu-020-single-row-write-verification): Single-row write verification

> **Note:** Statements marked with `**` could not be confirmed; treat as unknown until verified.

## Sources
- SAIF.Business.Menu/clsMenuSecurity.vb
