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

# SQL-009: Insert a new menu page

This statement is the `InsertSQL` implementation of `clsMenuPage.Criteria`, executed from `BeforeInsert` against `MENU_PAGE`. Insert a new menu page.

## Classification

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

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:MenuPageSeqNum` | Input | Decimal | N/A | Sequence-assigned primary key (from SQL-003) |
| `:PageName` | Input | String | 100 | Page link text shown to the user |
| `:FavoriteName` | Input | String | 100 | Favorite-specific display name |
| `:PageLink` | Input | String | 1000 | Page URL |
| `:ApplicationCode` | Input | String | 5 | Owning application code |
| `:SavePreferencesFlag` | Input | String | 1 | Show save-preferences toolbar action (`Y`/`N`) |
| `:PrintFlag` | Input | String | 1 | Show print toolbar action (`Y`/`N`) |
| `:DownloadFlag` | Input | String | 1 | Show download toolbar action (`Y`/`N`) |
| `:HelpFlag` | Input | String | 1 | Show help toolbar action (`Y`/`N`) |
| `:SaveFlag` | Input | String | 1 | Show save toolbar action (`Y`/`N`) |
| `:InsertFlag` | Input | String | 1 | Show insert toolbar action (`Y`/`N`) |
| `:DeleteFlag` | Input | String | 1 | Show delete toolbar action (`Y`/`N`) |
| `:PrintTip` | Input | String | 1000 | Print action tooltip |
| `:DownloadTip` | Input | String | 1000 | Download action tooltip |
| `:SaveTip` | Input | String | 1000 | Save action tooltip |
| `:InsertTip` | Input | String | 1000 | Insert action tooltip |
| `:DeleteTip` | Input | String | 1000 | Delete action tooltip |
| `:UserId` | Input | String | 30 | Acting user, trimmed and upper-cased, stamped as `UPDATE_USER` |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [MENU_PAGE](../database-tables.md#menu_page) | INSERT | MENU_PAGE_SEQ_NUM, PAGE_NAME, FAVORITE_NAME, PAGE_LINK_TXT, APPLICATION_CODE, toolbar *_FLAG / *_TIP_TXT columns, UPDATE_DATE, UPDATE_USER |

## Sample SQL

```sql
-- Insert a new menu page
INSERT INTO
  MENU_PAGE
  (
  MENU_PAGE_SEQ_NUM,
  PAGE_NAME,
  FAVORITE_NAME,
  PAGE_LINK_TXT,
  APPLICATION_CODE,
  SAVE_PREFERENCES_FLAG,
  PRINT_FLAG,
  DOWNLOAD_FLAG,
  HELP_FLAG,
  SAVE_FLAG,
  INSERT_FLAG,
  DELETE_FLAG,
  PRINT_TIP_TXT,
  DOWNLOAD_TIP_TXT,
  SAVE_TOOLTIP_TXT,
  INSERT_TOOLTIP_TXT,
  DELETE_TOOLTIP_TXT,
  UPDATE_DATE,
  UPDATE_USER
  )
VALUES
  (
  :MenuPageSeqNum,
  :PageName,
  :FavoriteName,
  :PageLink,
  :ApplicationCode,
  :SavePreferencesFlag,
  :PrintFlag,
  :DownloadFlag,
  :HelpFlag,
  :SaveFlag,
  :InsertFlag,
  :DeleteFlag,
  :PrintTip,
  :DownloadTip,
  :SaveTip,
  :InsertTip,
  :DeleteTip,
  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/clsMenuPage.vb
