通过Doc在MySQL数据库中建表

进入doc后:
show databases;
展示所有数据库
exit;
推出doc
create database School;
创建一个数据库
use School;
进入数据库
create table StudentInfo(
name char(10),
age char(3) );
建表
insert StudentInfo(name,age)
VALUES(‘大卫’,’18’);
插入数据
select *from StudentInfo;
查询
update StudentInfo set age=’12’ where name=’xidada’;
更新数据
insert into studentInfo (name,age)values(‘晶竹’,20);
插入数据
delete from StudentInfo where age=’20’;
删除数据

猜你喜欢

转载自blog.csdn.net/KEYMA/article/details/44226677