Database CLI: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
#<code>>SHOW DATABASES;</code> List all databases; | #<code>>SHOW DATABASES;</code> List all databases; | ||
#<code>>USE <database>;</code> Use a particular database, eg: <code>>USE bplan;</code>; | #<code>>USE <database>;</code> Use a particular database, eg: <code>>USE bplan;</code>; | ||
#<code>>SHOW TABLES;</code> List all tables in a database (after using USE); | |||
#<code>>DESCRIBE <table name>;</code> Prints the structure of a table, eg: <code>DESCRIBE tbl_entity;</code>; |
Revision as of 17:20, 7 July 2020
This page contains some helpful commands to use at the MariaDB CLI.
>SHOW DATABASES;
List all databases;>USE <database>;
Use a particular database, eg:>USE bplan;
;>SHOW TABLES;
List all tables in a database (after using USE);>DESCRIBE ; Prints the structure of a table, eg:
DESCRIBE tbl_entity;
;