Mysql 多表查詢結果增長序列號

先給出實現邏輯:sql SELECT (@i:=@i+1) as 序號,goods.* from goods LEFT JOIN stock_io ON goods.id = stock_io.goods_id LEFT JOIN (select @i := 0) as i ON 1=1; 網上找到一些查詢單表結果增長序列號的實現方式:     select (@i:=@i+1) as
相關文章
相關標籤/搜索