标签:
###MySql的更新
-----
select* from emp;
select * from dept1;
#####查询语句
update emp a,dept b set a.sal=a.sal*b.deptno,b.deptname=a.ename where a.deptno=b.deptno;
#####删除记录
·delete from emp where ename=‘dony‘;
#####查询部分字段
select ename,hiredate,sal,deptno from emp;
#####查询不重复的字段
select distinct deptno from emp;
#####条件查询
select * from emp where deptno=1;
select * from emp where deptno=1 and sal<3000;
标签:
原文地址:http://www.cnblogs.com/xiuxiu123/p/5064221.html