mariadb数据库语句
发布时间
阅读量:
阅读量
数据库基本语句总结
show databases; #显示数据库,类似于目录,里面包含多个表
use mysql; #进入名称为mysql的数据库
show tables; #显示刚才进入数据库mysql里面的所有表格
desc 表名; #显示表的结构
select * from user; #显示user表中的内容
select Host,User,Password from user; #显示某几列的内容
create database studentInfo; #创建新的数据库studentInfo
create table student(name varchar(50),age int,score float); # 创建student表格,表头为name 字符串型,age整型,score浮点型
insert into student values(“harry”,18,90); #表格中插入内容,和表头格式一致。
insert into student values(“粉条”,18,90); # 插入有中文的信息,发现查看的时候不显示
create table employee(id varchar(50),name varchar(50),age int) d
全部评论 (0)
还没有任何评论哟~
