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)
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)