怎么取最大ID,ID字段不是自增!
怎么取最大ID,ID字段不是自增!
------解决方案--------------------select max(id) from tb;
select top 1 id from tb order by id desc.
------解决方案--------------------1 select max(id) from tb--??????
2 去重复--??
------解决方案--------------------SQL code
select top 1 id from tb order by id desc
------解决方案--------------------
SQL code
select max(id) id from tb