摘要: 二、练习 1. 查询出部门编号为30的所有员工 select * from yg where deptno='30'; 2. 所有销售员的姓名、编号和部门编号。 select ename,empno,deptno from yg where job='销售员'; 3. 找出奖金高于工资的员工。 se 阅读全文
posted @ 2018-06-03 23:44 所爱隔山隔海 阅读(173) 评论(0) 推荐(0)
摘要: 1、最简单查询: select * from car; 2、查询制定列: select name oil,powers from car; 3、对查出的列名修改名字: select name as '车名',oil as '油耗',powers as '动力' from car; 4、按条件查询: 阅读全文
posted @ 2018-06-03 11:54 所爱隔山隔海 阅读(180) 评论(0) 推荐(0)
摘要: 增删改 添加表数据: 1、insert into car values('','','','',''); 2、insert into car(字段1,字段2,....) values(值1,值2,....); 3、insert into car set 字段1 = 值1,字段2 = 值2,...; 阅读全文
posted @ 2018-06-03 11:19 所爱隔山隔海 阅读(100) 评论(0) 推荐(0)
摘要: 11、修改表名称 alter table 原表名称 rename as 新表名称12、添加字段 在字段尾部添加新字段 alter table 表名称 add 新字段名 数据类型(数据长度) 是否非空 设置唯一主键 设置自增长 在字段头部添加新字段 alter table 表名称 add 新字段名 数 阅读全文
posted @ 2018-06-03 11:09 所爱隔山隔海 阅读(150) 评论(0) 推荐(0)