---
title: "SQL-019: Retrieve menu favorite by key"
summary: Retrieves a single MENU_FAVORITE record by MENU_FAVORITE_SEQ_NUM.
status: draft
owner: SAIF
last_reviewed: 2026-07-24
library: SAIF.Business.Menu
reference_type: package
---

# SQL-019: Retrieve menu favorite by key

Retrieves a single menu favorite record from `MENU_FAVORITE` by its primary key.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-019 |
| **Operation type** | Read |
| **Execution method** | Inline SQL |
| **Database** | Oracle |
| **Schema** | `[unqualified]**` |
| **Command type** | Text |
| **Business object** | `clsMenuFavorite` |
| **Criteria property** | `RetrieveSQL` |
| **Lifecycle method** | `BeforeRetrieve` / `AfterRetrieve` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:MenuFavoriteSeqNum` | Input | Decimal** | N/A | Primary key bound from `MyCriteria.MenuFavoriteSeqNum`. |

## Tables

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

## Sample SQL

```sql
Select MENU_FAVORITE.MENU_FAVORITE_SEQ_NUM as MenuFavoriteSeqNum,
       MENU_FAVORITE.MENU_USER as UserID,
       MENU_FAVORITE.MENU_USER_EMPLID as UserEmplID,
       MENU_FAVORITE.MENU_ITEM_SEQ_NUM as MenuItemSeqNum,
       MENU_FAVORITE.MENU_ORDER_NUM as MenuOrder,
       MENU_FAVORITE.ITEM_INACTIVE_DATE as ItemInactiveDate
From MENU_FAVORITE
Where MENU_FAVORITE.MENU_FAVORITE_SEQ_NUM = :MenuFavoriteSeqNum
```

## Operations and processes
- [Favorite menu management](../operations/favorite-menu-management.md)



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