摘要: 作用: - 约束 - 加速查找 普通索引:加速查找 create index 索引名称 on 表名(列名,) drop index 索引名称 on 表名 主键索引:加速查找+不能为空+不能重复 create unique index 索引名称 on 表名(列名) drop unique index 阅读全文
posted @ 2018-03-15 18:05 Claire_xu 阅读(131) 评论(0) 推荐(0) 编辑
摘要: date_format函数 阅读全文
posted @ 2018-03-15 17:45 Claire_xu 阅读(264) 评论(0) 推荐(0) 编辑
摘要: 视图 # 视图也是一张表,但在data文件里只有表结构,没有表数据 # 不建议使用,扩展性差,程序需改变时,依赖的视图也要改变 # 视图牵涉到多张表时,视图中的记录不能修改。 create view course2teacher as select * from course inner join 阅读全文
posted @ 2018-03-15 17:22 Claire_xu 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 创建本地账号 create user 'egon1'@'localhost' identified by '123'; # mysql -uegon1 -p123 创建远程账号 create user 'egon2'@'192.168.31.10' identified by '123'; # my 阅读全文
posted @ 2018-03-15 14:08 Claire_xu 阅读(263) 评论(0) 推荐(0) 编辑