views
The .views command lists all views available in the current schema or data source. This is useful for data
exploration, understanding database structure, and identifying available views for querying.
Usage
.views
When to use
- Use
.viewsto discover available views before writing queries. - Helpful for exploring unfamiliar databases, verifying schema changes, or understanding the logical data model.
Examples
List all views in the current schema:
.views
Troubleshooting
- If no views are listed, ensure you are connected to the correct schema and have the necessary permissions.
- Some data sources may require you to set the schema context first.
- Not all data sources support views. For example, file-based data sources and DynamoDB do not have views.