---
title: "SQL-007: Insert menu favorite"
summary: Inserts a new per-user favorite menu-item bookmark into MENU_FAVORITE.
status: draft
owner: SAIF
last_reviewed: 2026-07-24
library: SAIF.Business.Menu
reference_type: package
---

# SQL-007: Insert menu favorite

Inserts a new user favorite menu-item bookmark into the `MENU_FAVORITE` table. The primary key (`MenuFavoriteSeqNum`) is obtained beforehand via [SQL-001](SQL-001-saif-business-menu.md).

## Classification

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

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:MenuFavoriteSeqNum` | Input | Decimal** | N/A | Primary key bound from `MenuFavoriteSeqNum`. |
| `:UserID` | Input | String** | 30 | User login bound from `UserID`. |
| `:MenuItemSeqNum` | Input | Decimal** | N/A | Menu item FK bound from `MenuItemSeqNum`. |
| `:MenuOrder` | Input | Decimal** | N/A | Display order bound from `MenuOrder`. |
| `:UserEmplID` | Input | String** | 11 | Employee ID bound from `m_UserEmplID`. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [MENU_FAVORITE](../database-tables.md#menu-favorite) | INSERT | `MENU_FAVORITE_SEQ_NUM`, `MENU_USER`, `MENU_USER_EMPLID`, `MENU_ITEM_SEQ_NUM`, `MENU_ORDER_NUM` |

## Sample SQL

```sql
Insert into MENU_FAVORITE (
    MENU_FAVORITE_SEQ_NUM, MENU_USER, MENU_USER_EMPLID,
    MENU_ITEM_SEQ_NUM, MENU_ORDER_NUM
) Values (
    :MenuFavoriteSeqNum, :UserID, :UserEmplID,
    :MenuItemSeqNum, :MenuOrder
)
```

## Operations and processes
- [Favorite menu management](../operations/favorite-menu-management.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\clsMenuFavorite.vb`
