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

# SQL-011: Insert a new group membership

This statement is the `InsertSQL` implementation of `clsMenuSecurityUser.Criteria`, executed from `BeforeInsert` against `MENU_SECURITY_USER`. Insert a new group membership.

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

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:SecurityGroupTxt` | Input | String | 255 | Security-group name the user is joining |
| `:MenuUser` | Input | String | 30 | Menu user account name |
| `:MenuUserID` | Input | String | 11 | Employee ID stored alongside the membership |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [MENU_SECURITY_USER](../database-tables.md#menu_security_user) | INSERT | MENU_SECURITY_USER_SEQ_NUM (inline NEXTVAL), SECURITY_GROUP_TXT, MENU_USER, MENU_USER_EMPLID |

## Sample SQL

```sql
-- Insert a new group membership
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

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

## Business rules

- [BR-MENU-014](../business-rules.md#br-menu-014-sequence-assigned-identity): Sequence-assigned identity
- [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/clsMenuSecurityUser.vb
