摘要: 今天看了篇帖子,被几个地方转载,但是性能不太好,因为不能评论,所以把优化思路写在这里。1.确定需求: 根据部门来分组,显示各员工在部门里按薪水排名名次.2.来创建实例数据:drop table if exists heyf_t10;create table heyf_t10 (empid int ,deptid int ,salary decimal(10,2) );insert into heyf_t10 values(1,10,5500.00),(2,10,4500.00),(3,20,1900.00),(4,20,4800.00),(5,40,6500.00),(6,40,14500.0 阅读全文
posted @ 2012-08-29 18:00 xxd 阅读(10823) 评论(1) 推荐(0) 编辑