# SQL Server Query a SQL Server database — run parametrised SQL against a named connection and get back capped, paginated rows. Read your schema by querying information_schema and the sys catalog views directly. Run these through `omni-cli` once a human has connected the platform (`omni-cli sqlserver login`). Full parameter and output schemas come from `omni-cli discovery sqlserver`. ## discovery | Command | What it does | Kind | |---|---|---| | `omni-cli sqlserver foreign-key list` | List foreign keys, showing which columns reference which table. | read | | `omni-cli sqlserver index list` | List indexes and the columns they cover. | read | | `omni-cli sqlserver server info` | Show the database server version and the identity this connection uses. | read | | `omni-cli sqlserver table describe` | Show a table's columns with their types, nullability, defaults and primary key. | read | | `omni-cli sqlserver table list` | List the tables and views in a schema. | read | ## query | Command | What it does | Kind | |---|---|---| | `omni-cli sqlserver query explain` | Show how the database would run a statement, without running it. | read | | `omni-cli sqlserver query run` | Run a SQL statement against a named connection and return the rows it produces. | write |