管理数据库
查询
MariaDB [(none)]> show databases;
创建
MariaDB [(none)]> create database school;
删除
MariaDB [(none)]> drop database school;
使用
MariaDB [(none)]> use school;
Database changed
MariaDB [school]>
MariaDB [school]> use mysql;
MariaDB [mysql]>
管理数据库中的表格
查询
MariaDB [school]> show tables; #查询当前数据库下的表格
Empty set (0.000 sec) #没有表格
MariaDB [mysql]> show tables; #数据库中的表格
MariaDB [school]> show columns from student;
创建
MariaDB [school]> create table student(Sno char(8), Sname varchar(8), Sage int, Saddress varchar (20));
删除
MariaDB [school]> drop table student; 表格的名称student