---
title: "SQL-MENU-040: Update menu favorite"
summary: "Update a menu favorite row."
status: draft
owner: SAIF documentation team
last_reviewed: 2026-08-17
library: SAIF.Business.Menu
reference_type: package
---

# SQL-MENU-040: Update menu favorite

Update a menu favorite row.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-MENU-040 |
| **Operation type** | Update |
| **Execution method** | Inline SQL |
| **Database** | Oracle |
| **Schema** | [unqualified]** |
| **Command type** | Text |
| **Business object** | `clsMenuFavorite` |
| **Criteria property** | `UpdateSQL` |
| **Lifecycle method** | `BeforeUpdate` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:MenuFavoriteSeqNum` | Input | Decimal | N/A | Favorite-row key. |
| `:UserID` | Input | String | 30 | Favorite owner login. |
| `:UserEmplID` | Input | String | 11 | Favorite owner employee id. |
| `:MenuItemSeqNum` | Input | Decimal | N/A | Menu item key. |
| `:MenuOrder` | Input | Decimal | N/A | Favorite display order. |
| `:ItemInactiveDate` | Input | Date | N/A | Soft-delete date. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [MENU_FAVORITE](../database-tables.md#menufavorite) | UPDATE | `MENU_FAVORITE_SEQ_NUM`, `MENU_USER`, `MENU_ITEM_SEQ_NUM`, `MENU_ORDER_NUM`, `ITEM_INACTIVE_DATE` |

## Sample SQL

```sql
UPDATE MENU_FAVORITE
SET
  MENU_FAVORITE_SEQ_NUM = :MenuFavoriteSeqNum,
  MENU_USER = :UserID,
  MENU_USER_EMPLID = :UserEmplID,
  MENU_ITEM_SEQ_NUM = :MenuItemSeqNum,
  MENU_ORDER_NUM = :MenuOrder,
  ITEM_INACTIVE_DATE = :ItemInactiveDate
WHERE MENU_FAVORITE.MENU_FAVORITE_SEQ_NUM = :MenuFavoriteSeqNum
```

## Operations and processes
- [Manage a user's menu favorites](../operations/manage-menu-favorites.md)

## Business rules
- [BR-MENU-001: Optimistic contention on write](../business-rules.md#br-menu-001-optimistic-contention-on-write)

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

## Sources
- `SAIF.Business.Menu\clsMenuFavorite.vb`
