Get DB Table Keys
mssql_db_table_keysAudit SQL Server table keys: list row counts, heap or clustered indexes, primary keys, and unique indexes, flagging heaps, missing primary keys, and tables with no unique index beyond the primary key.
Instructions
Table keys: every user table with row count, heap or clustered index, primary key and other unique indexes. Flags heaps, tables without a primary key, and tables where only the primary key is unique. onlyFlagged=true (default) returns only flagged tables.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| onlyFlagged | No | Return only tables with a flag. Set false to return all tables. | |
| databaseName | No | Target database. Defaults to connected database. |