create table t_Product(proid int,proname varchar(10))
insert into t_Product values(1,'产品1')
insert into t_Product values(2,'产品2')
insert into t_Product values(3,'产品3')
create table t_Click(clickid int,proid int,clickrate int)
insert into t_Click values(1,1,57)
insert into t_Click values(2,2,22)
insert into t_Click values(3,3,110)
select m.* , n.* from t_Product m, t_Click n where m.proid = n.proid order by n.clickrate desc
drop table t_Product , t_Click
/*
proid proname clickid proid clickrate
----------- ---------- ----------- ----------- -----------
3 产品3 3 3 110
1 产品1 1 1 57
2 产品2 2 2 22
(所影响的行数为 3 行)
*/