> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# Default catalog

> StarRocks 2.3 and later provide an internal catalog to manage the internal data of the database.

This topic describes what the default catalog is, and how to query the internal data of the database by using the default catalog.

StarRocks 2.3 and later provide an internal catalog to manage the internal data of the database. Each cluster has only one internal catalog named `default_catalog`. Currently, you cannot modify the name of the internal catalog or create a new internal catalog.

## Query internal data

1. Connect your cluster.
   * If you use the MySQL client to connect the cluster, you go to `default_catalog` by default after connecting.
   * If you use JDBC to connect the cluster, you can go directly to the destination database in the default catalog by specifying `default_catalog.db_name` when connecting.

2. (Optional) Use [SHOW DATABASES](/documents/4.2/sql-reference/sql-statements/Database/SHOW_DATABASES.md) to view databases:

   ```SQL theme={null}
   SHOW DATABASES;
   ```

   Or

   ```SQL theme={null}
   SHOW DATABASES FROM <catalog_name>;
   ```

3. (Optional) Use [SET CATALOG](/documents/4.2/sql-reference/sql-statements/Catalog/SET_CATALOG.md) to switch to the destination catalog in the current session:

   ```SQL theme={null}
   SET CATALOG <catalog_name>;
   ```

   Then, use [USE](/documents/4.2/sql-reference/sql-statements/Database/USE.md) to specify the active database in the current session:

   ```SQL theme={null}
   USE <db_name>;
   ```

   Or, you can use [USE](/documents/4.2/sql-reference/sql-statements/Database/USE.md) to directly go to the active database in the destination catalog:

   ```SQL theme={null}
   USE <catalog_name>.<db_name>;
   ```

4. Use [SELECT](/documents/4.2/sql-reference/sql-statements/table_bucket_part_index/SELECT/SELECT.md) to query internal data:

   ```SQL theme={null}
   SELECT * FROM <table_name>;
   ```

   If you do not specify the active database in the preceding steps, you can directly specify it in a select query:

   ```SQL theme={null}
   SELECT * FROM <db_name>.<table_name>;
   ```

   Or

   ```SQL theme={null}
   SELECT * FROM default_catalog.<db_name>.<table_name>;
   ```

## Examples

To query data in `olap_db.olap_table`, you can perform one of the following operations:

```SQL theme={null}
USE olap_db;
SELECT * FROM olap_table limit 1;
```

Or

```SQL theme={null}
SELECT * FROM olap_db.olap_table limit 1;     
```

Or

```SQL theme={null}
SELECT * FROM default_catalog.olap_db.olap_table limit 1;      
```

## References

To query data from external data sources, see [Query external data](/documents/4.2/data_source/catalog/query_external_data.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.