进入mysql界面,点左上角主页,
右击local instance mysql57,点击start command line client调出命令提示符
MySQL语句:
show databases;
drop database if exists 库名;
create database 库名;
use 库名;
show tables desc ;
drop table if exists 表名;
create table 新表 (select id,userName from 原表);
create table 新表 (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '学号',...) ENGINE=InnoDB DEFAULT CHARSET=utf8; #DDL
insert into 表名(id,userName) values (0,'鸣');
insert into 表名 values ('1', '2024-04-15 10:12:12', '张三', '15612345678', '19', '男'); #DML 增
update 表名 set userName = null,info = '喵' where cust_id = '3'; ##用null删某一列值 改
select 列名 AS 别名 from 表名 where 表达式 order by 列名 desc limit 4,2; #查 从第五行开始查两行
delete from 表名 (where ) ; #无法删某一列值
truncate (table) 表名; #清除表数据
drop (table) 表名; #删除表 删
drop database schooldb;删除数据库
删除时先删从表,再删主表。