我正在处理sql查询,请检查并给我解决方案
请在下面找到表格的任务简要详细信息
表 1 'tbl_SuperAdmin'
已归档
数据样例
s_id name age gtc.......
1 abc 23 .........
2 cda 42 ..........
另一个表2有'tbl_Renewal'
renewalid renname date supid Payed etc......
1 first - 1 1 ........
2 first - 2 1 ........
3 second - 1 0 ........
4 second - 1 1 ........
5 third- 1 1 ........
查询是 select *from tbl_superadmin as a inner join tbl_Renewal as b on a.s_id=b.supid
结果是
s_id name age gtc....... renewalid renname date supid Payed etc.......
1 abc 23 .............1 first - 1 1 ........
2 cda 42 .............2 first - 2 1 ........
1 abc 23 .............3 second - 1 0 ........
1 abc 23 .............4 second - 1 1 ........
1 abc 23 .............5 third - 1 1 ........
在这里我想要如何支付=1 和更新id desc 并且不需要 s_id 不再重复 1 次
我想展示我的结果
s_id name age gtc....... renewalid renname date supid Payed etc.......
1 abc 23 .............5 third - 1 1 ........
2 cda 42 .............2 first - 2 1 ........
像这个结果我想要请任何人帮助它
谢谢 pradeep