# `Sp_GetMasterSlave` (procedure) > 根据模块sId删除模块(包含子模块) - **Type:** PROCEDURE - **Deterministic:** NO - **SQL data access:** CONTAINS SQL ## Parameters | # | Mode | Name | Type | |---|---|---|---| | 1 | IN | `sTableName` | `varchar(255)` | | 2 | OUT | `sMasterTableName` | `varchar(255)` | | 3 | OUT | `sSaveTableNames` | `varchar(255)` | | 4 | OUT | `sMasterColumn` | `varchar(255)` | | 5 | OUT | `sSlaveColumn` | `varchar(255)` | | 6 | OUT | `sUpdateCloumn` | `varchar(255)` | ## Body _Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURE `Sp_GetMasterSlave`'`._ ## Narrative **Business context:** Master-slave table-config lookup — given a table name, returns the canonical master-table name + comma-joined slave-table list + master/slave/update key columns out of `masterslavetableconfig`. Used by the universal save/delete/invalidate plumbing to know which slave tables to cascade an action across. **What it does:** Trims the input, does a `LIKE '%name%'` lookup against `masterslavetableconfig`, and writes the five OUT params; when no row matches, treats the input as the master table itself (`sMasterColumn='sId'`, no slaves). **Invocation:** Called by `Sp_DelMasterSlave_Pro`, `Sp_DelMasterSlave_Pro2`, `Sp_Invalidation`, `Sp_UpdateAdd_Check`, `Sp_UpdateAdd_Check_NEW` — all of which are themselves dispatched by Java `BusinessBaseServiceImpl` / `BusinessCheckServiceImpl` / `CheckmodelServiceImpl` during the universal add-update / invalidate / delete CRUD pipeline. Catalog header `根据模块sId删除模块(包含子模块)` is mis-copied from a different routine; body is a config-lookup, not a delete.