A guided path
Exploration guided by a question.
Each entry begins with something we need to locate or distinguish: a table mentioned in an error, a column whose origin is unknown, a dependency, a difference between sets, or the actual scope of a change.
The path moves from metadata and relationships toward data validation and controlled modifications. The queries reduce the investigation space. The model, permissions, and deployment history complete the context.
How to use it
Evidence for exploration and change.
- Define the object or scopeLimit the database, table, pattern, or set that you actually need to investigate.
- Read metadata in contextVisibility depends on permissions. Identifying who made a change requires evidence beyond a recorded date.
- Validate before converting or modifyingIdentify problematic rows and compare the intended set with the result.
- Keep a verifiable outputControlled changes show target rows, previous values, and the result before confirmation.
Editorial method
The scope of each query.
Examples avoid claiming that a catalog or system view contains the complete history of a database. Each entry explains which conclusion can be drawn and which additional evidence is still missing.
Write operations use filters, limits, row checks, and controlled rollback. Before adapting a query, permissions, cost, potential blocking, and dependencies are reviewed.
Read the editorial methodologyThe path
Five exploration sections.
The order begins with visible structure, continues with data quality, and ends with comparisons and delimited operations.
Locate objects and relationships
Queries for reconstructing names, columns, dependencies, keys, indexes, and triggers in an existing database.
- 01Search for a table or view by name
- 02Search for a column across the database
- 03Search for text inside procedures, views, and functions
- 04Inspect the dependencies of an object
- 05List relationships and foreign keys
- 06Inspect primary keys, unique constraints, and indexes
- 07List columns with type, length, nullability, and default value
- 08Find triggers and their associated tables
Recognize size and state
Modification dates, approximate row counts, used space, and IDENTITY columns.
Check data quality and compatibility
Duplicates, orphaned rows, differences between sets, and conversions that may fail.
Modify with control
UPDATE and DELETE examples that delimit the target, preserve evidence, and roll back by default.
Compare and describe
Structures across databases, result metadata, tables without a primary key, and targeted value searches.