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

# SQL-008: Insert a new menu item

This statement is the `InsertSQL` implementation of `clsMenuItem.Criteria`, executed from `BeforeInsert` against `MENU_ITEM`. Insert a new menu item.

## Classification

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

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:MenuItemSeqNum` | Input | Decimal | N/A | Sequence-assigned primary key (from SQL-002) |
| `:MenuPageSeqNum` | Input | Decimal | N/A | Page placed by this item |
| `:MenuCategoryCode` | Input | String | 5 | Owning category code |
| `:ToolTip` | Input | String | 1000 | Item tooltip text |
| `:VisibleFlag` | Input | String | 1 | Visibility as `Y`/`N` (`IsVisible.ToY_N_String`) |
| `:PageOrder` | Input | Decimal | N/A | Display order within the category |
| `:UserId` | Input | String | 30 | Acting user, trimmed and upper-cased, stamped as `UPDATE_USER` |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [MENU_ITEM](../database-tables.md#menu_item) | INSERT | MENU_ITEM_SEQ_NUM, MENU_PAGE_SEQ_NUM, MENU_CATEGORY_CODE, TOOL_TIP_TXT, VISIBLE_FLAG, PAGE_ORDER_NUM, UPDATE_DATE, UPDATE_USER |

## Sample SQL

```sql
-- Insert a new menu item
Insert into
  MENU_ITEM
  (
  MENU_ITEM_SEQ_NUM,
  MENU_PAGE_SEQ_NUM,
  MENU_CATEGORY_CODE,
  TOOL_TIP_TXT,
  VISIBLE_FLAG,
  PAGE_ORDER_NUM,
  UPDATE_DATE,
  UPDATE_USER
  )
Values
  (
  :MenuItemSeqNum,
  :MenuPageSeqNum,
  :MenuCategoryCode,
  :ToolTip,
  :VisibleFlag,
  :PageOrder,
  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-019](../business-rules.md#br-menu-019-yn-boolean-flag-storage): Y/N boolean flag storage
- [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/clsMenuItem.vb
