更新最大值
列:
id c_id length flag_x
1121230
2121212
3121218
4121230
545432
645432
745487
结果
id c_id length flag_x
11212301
2121212
3121218
4121230
545432
645432
7454871
[解决办法]
Update A Set flag_x = 1 From 表 A Where id = (Select TOP 1 id From 表 Where c_id =A.c_id Order By length Desc, id)