---
title: "SQL-017: Retrieve menu category code by key"
summary: Retrieves a single MENU_CATEGORY_CODE record by CODE.
status: draft
owner: SAIF
last_reviewed: 2026-07-24
library: SAIF.Business.Menu
reference_type: package
---

# SQL-017: Retrieve menu category code by key

Retrieves a single category code record from `MENU_CATEGORY_CODE` by its `CODE` key.

## Classification

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

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:Code` | Input | String** | 5 | Category code key bound from `MyCriteria.Code`. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [MENU_CATEGORY_CODE](../database-tables.md#menu-category-code) | SELECT | `CODE`, `CODE_DESCR` |

## Sample SQL

```sql
Select MENU_CATEGORY_CODE.CODE as Code,
       MENU_CATEGORY_CODE.CODE_DESCR as CodeDescr
From MENU_CATEGORY_CODE
Where MENU_CATEGORY_CODE.CODE = :Code
```

## Operations and processes
- [Menu categorization](../operations/menu-categorization.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\clsMenuCategoryCode.vb`
