SELECT @row := @row + 1 as row, t.id FROM sgcorp_product t, (SELECT @row := 0) r where t.id not in(select product_id from sgcorp_pic)
MySQL查询结果条数编号示例 mysql 查找结果中自动加序号列
最新推荐文章于 2023-09-08 09:55:08 发布
SELECT @row := @row + 1 as row, t.id FROM sgcorp_product t, (SELECT @row := 0) r where t.id not in(select product_id from sgcorp_pic)