Difference between revisions of "Show databases"
Jump to navigation
Jump to search
(Created page with " SELECT datname FROM pg_database WHERE datistemplate = false;") |
|||
(27 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | SELECT datname FROM pg_database | + | {{lc}} |
− | WHERE datistemplate = false; | + | * [[MariaDB]]: <code>[[show databases;]]</code> |
+ | * [[MongoDB]]: <code>[[show databases;]]</code> | ||
+ | * [[PostgreSQL]]: <code>[[\list]]</code> | ||
+ | |||
+ | |||
+ | |||
+ | [[PostgreSQL]]: | ||
+ | |||
+ | <code>[[\list]]</code> | ||
+ | |||
+ | SELECT datname FROM [[pg_database]] WHERE datistemplate = false; | ||
+ | datname | ||
+ | ---------- | ||
+ | postgres | ||
+ | (1 row) | ||
+ | |||
+ | SELECT datname FROM pg_database WHERE datistemplate = false; | ||
+ | datname | ||
+ | ---------- | ||
+ | postgres | ||
+ | your_database_name | ||
+ | (2 rows) | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | * [[MariaDB]]: <code>[[show databases;]]</code> | ||
+ | * [[MongoDB]]: <code>[[show databases;]]</code> | ||
+ | |||
+ | rs0:PRIMARY> show databases; | ||
+ | admin 0.031GB | ||
+ | config 0.031GB | ||
+ | local 0.281GB | ||
+ | YOUR_NAME 2.499GB | ||
+ | |||
+ | |||
+ | == Related terms == | ||
+ | * {{TOC operation databases}} | ||
+ | * [[PostgreSQL]]: <code>[[connect to]] [[MY_DATABASE_NAME]]</code> | ||
+ | * [[Show (MariaDB)]] | ||
+ | |||
+ | == See also == | ||
+ | * {{SQL}} | ||
+ | * {{DBs}} | ||
+ | |||
+ | [[Category:PostgreSQL]] |
Latest revision as of 17:35, 8 January 2024
\list
SELECT datname FROM pg_database WHERE datistemplate = false; datname ---------- postgres (1 row)
SELECT datname FROM pg_database WHERE datistemplate = false; datname ---------- postgres your_database_name (2 rows)
rs0:PRIMARY> show databases; admin 0.031GB config 0.031GB local 0.281GB YOUR_NAME 2.499GB
Related terms[edit]
- Connect to a database
- Show databases
- Create database
- Delete database
- Create user
- List users
- List databases
- List tables:
show tables
- GRANT
- PostgreSQL:
connect to MY_DATABASE_NAME
- Show (MariaDB)
See also[edit]
- SQL, NewSQL, RDMS: GraphQL (2015), SQLite,
select, insert
,select count
, Distributed SQL, TablePlus, Cache hit ratio,pg_stat_user_tables
,EXPLAIN
, Index (PostgreSQL), DDL, SQL/MED, Group by, List users, SQL Injection, SQLAlchemy,CREATE USER, CREATE ROLE, EXPLAIN, ALTER DATABASE, REVOKE, NOLOCK, NOWAIT, EXISTS
, Unique constraint,.sql
- Databases: Database management, SQL, NoSQL, Wide column, PostgreSQL, MariaDB, MySQL, Derby DB, MongoDB, Cassandra, SQLite, HSQL2, H2, RocksDB, Microsoft SQL Server, DB2, Oracle Database, Memcached, Berkeley DB, Collation, SingleStore, Amazon Aurora, Graph database, Amazon DynamoDB, PrestoDB, Cache hit ratio, ACID, WAL, ARIES, DBMS, OLTP, OLAP, Database Schema, CockroachDB, Tables, Views, Apache Druid, RDMS
Advertising: