sql_check_foreign_keys
Check for foreign key violations and orphaned records in SQL Server tables. Identify rows referencing non-existent parent rows to diagnose referential integrity issues.
Instructions
Find foreign key violations in a table — records that reference non-existent parent rows (orphaned data). Very useful for diagnosing referential integrity issues.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | No | Specific table to check. If omitted, checks ALL tables. |