mysql - 这个SQL是函数还是触发器还是存储过程?
怪我咯
怪我咯 2017-04-17 13:11:59
0
0
325

set @num := 0, @type := '';

select type, variety, price,

  @num := if(@type = type, @num + 1, 1) as row_number,
  @type := type as dummy

from fruits
group by type, price, variety
having row_number <= 2;

怪我咯
怪我咯

走同样的路,发现不同的人生

membalas semua(0)
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan