摘要: 阅读全文
posted @ 2017-04-15 21:57 夏天的西瓜君 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 第一种方式: 第二种方式: 创建表的时候,可以通过增加ENGINE关键字设置新建表的存储引擎。例如 create table yxm( id bigint(20) not null auto_increment, name char(20) ) ENGINE=MyISAM DEFAULT CHARS 阅读全文
posted @ 2017-04-15 21:33 夏天的西瓜君 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 1.按照层次看帮助 “?contents”命令来显示所有可供查询的的分类 mysql> ? contentsYou asked for help about help category: "Contents"For more information, type 'help <item>', wher 阅读全文
posted @ 2017-04-15 18:19 夏天的西瓜君 阅读(268) 评论(0) 推荐(0) 编辑
摘要: 创建一个数据库用户yxm,具有对sakila 数据库中所有表的SELECT/INSERT grant select,insert on sakila.* to 'yxm'@'localhost' identified by '123'; 需要将yxm的权限变更,收回INSERT,只能对数据进行SEL 阅读全文
posted @ 2017-04-15 17:50 夏天的西瓜君 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 脚本方式删除表 if exists (select 1 from sysobjects where id = object_id('users') and type = 'U') drop table usersgo 建表 create table users( id integer not nul 阅读全文
posted @ 2017-04-15 14:17 夏天的西瓜君 阅读(2324) 评论(0) 推荐(0) 编辑
摘要: 1.插入记录 insert into emp(ename,hiredate,sal,deptno) values ('yxm1','2000-01-01','2000',1); 也可以不指定字段名称,如下 insert into emp values('yxm1','2000-01-01','200 阅读全文
posted @ 2017-04-15 14:10 夏天的西瓜君 阅读(289) 评论(0) 推荐(0) 编辑