启动(进入cmd到数据库的bin文件夹中):mysql -uroot -p
退出:quit
创建一个数据库first:create database first;
进入数据库first:use first;
查看数据库中的表:show tables;
查看表student的结构:desc student;
修改表名:alter table oldName rename to newName;
修改字段名:alter table 表名 change 旧字段名 新字段名 新数据类型;
删除表student:drop table student;
删除数据库first:drop database first;
查看数据库版本号:select version();
MySQL数据库建表建库常用命令
于 2021-12-27 22:08:13 首次发布