Difference between revisions of "Show databases"
Jump to navigation
Jump to search
(4 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
+ | {{lc}} | ||
+ | * [[MariaDB]]: <code>[[show databases;]]</code> | ||
+ | * [[MongoDB]]: <code>[[show databases;]]</code> | ||
+ | * [[PostgreSQL]]: <code>[[\list]]</code> | ||
+ | |||
+ | |||
[[PostgreSQL]]: | [[PostgreSQL]]: | ||
+ | |||
+ | <code>[[\list]]</code> | ||
+ | |||
SELECT datname FROM [[pg_database]] WHERE datistemplate = false; | SELECT datname FROM [[pg_database]] WHERE datistemplate = false; | ||
datname | datname | ||
Line 14: | Line 23: | ||
(2 rows) | (2 rows) | ||
− | |||
− | * [[MariaDB]]: <code>[[show databases]]</code> | + | |
− | * [[MongoDB]]: <code>[[show databases]]</code> | + | * [[MariaDB]]: <code>[[show databases;]]</code> |
+ | * [[MongoDB]]: <code>[[show databases;]]</code> | ||
rs0:PRIMARY> show databases; | rs0:PRIMARY> show databases; | ||
Line 33: | Line 42: | ||
== See also == | == See also == | ||
− | |||
− | |||
− | |||
* {{SQL}} | * {{SQL}} | ||
* {{DBs}} | * {{DBs}} | ||
[[Category:PostgreSQL]] | [[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: