查看数据库的命令是:【show databases】,该命令可以查看所有的数据库。如果我们要查看数据库中的表,可以使用命令【show tables】。如果输入了错误命令,可以使用【\c】结束。
查看数据库可以使用 show databases 命令,该命令可以查看所有的数据库,等同于如下命令
(推荐教程:mysql教程)
select schema_name from information_schema.schemata\G相关介绍:
使用 use 命令可以选择数据库 例如 use information_schema,当使用此命令后
select schema_name from information_schema.schemata\G可以为
select schema_name from schemata\G如果要查看数据库中的表,可以使用命令
show tables同样也可以在information_schema中查看,show命令是方便使用的简短模式。
select table_name from tables where table_schema='jblog';如果要查看表结构,可以使用命令
desc table_name;如果要查看表状态,可以使用命令
show table status from db like 条件提示:当多行命令输入,发现错误后,可以用\c结束。
以上就是查看数据库的命令是什么的详细内容!
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did93947
查看数据库的命令是什么
阅读:69次