Updated on 2025-10-23 GMT+08:00

connection.select_db(dbname)

Description

This method switches the current active database.

Prototype

connection.select_db(dbname)

Parameters

Table 1 cursor.select_db (dbname)

Keyword

Parameter Description

dbname

Name of the database to be connected.

Return Value

None

Examples

For details, see Examples: Common Operations.