mysql -h localhost -uroot -p//登陆mysql
show databases;//查看所有数据库
show databases like “%t”;//查看包含t字符的数据库
use test;//使用test数据库
show tables;//查看当前数据库所有表
show tables like “%t”;//查看当前包含字符t的所有表
describe goods;//查看goods表结构
select * from goods;//查询goods表所有列数据
show create table goods;//查看goods表的创建结构
show create database test;//查看test数据库的创建结构
key words:
|—————————|
auto_increment 自增长
primary KEY 主键
foreign key 外键
view 视图
index 索引
sequence 序列
default 默认值
|—————————|
like 匹配
not null 不为空
references 连接
procedure 存储过程
|—————————|
Welcome to mysql.