sql学习5
时间:2010-09-25 来源:为你抒写
select * from t_person
select * from t_employee where fname like 'n%' select * from t_employee where fname like '%i' select * from t_employee where fname like '%a_' select * from t_employee where fage between 18 and 22 select * from t_employee where fage in(12,22,27) select count(*) from t_employee where fage=20 alter table t_employee add fsubcompany varchar(20); alter table t_employee add fdepartment varchar(20); select * from t_employee update t_employee set fsubcompany='beijing',fdepartment='development' where fnumber='edvoo1'; update t_employee set fsubcompany='shenzhen',fdepartment='development' where fnumber='edvoo2'; update t_employee set fsubcompany='zhengzhou',fdepartment='development' where fnumber='edvoo3'; update t_employee set fsubcompany='luoyang',fdepartment='sales' where fnumber='edvoo4'; update t_employee set fsubcompany='guilin',fdepartment='infotech' where fnumber='edvoo5'; update t_employee set fsubcompany='beijing',fdepartment='development' where fnumber='edvoo6'; update t_employee set select fage from t_employee group by fage select fage from t_employee where fsubcompany='beijing' group by fage select fsubcompany,fdepartment from t_employee group by fsubcompany,fdepartment select fage,count(*) countofthisage from t_employee group by fage 相关阅读 更多 +