Sql语句求最小可用id
摘要:selectidfromtestawherenotexists(select1fromtestwhereid=a.id+1)orderbyi...
selectidfromtestawherenotexists
(
select1fromtestwhereid=a.id+1
)
orderbyid
缺点,不从1开始计算。
【Sql语句求最小可用id】相关文章:
★ WordPress导入数据库出现”Unknown collation: ‘utf8mb4_unicode_ci”错误的解决办法
★ ms SQL server数据库备份、压缩与SQL数据库数据处理的方法