Sql语句求最小可用id
摘要:selectidfromtestawherenotexists(select1fromtestwhereid=a.id+1)orderbyi...
selectidfromtestawherenotexists
(
select1fromtestwhereid=a.id+1
)
orderbyid
缺点,不从1开始计算。
【Sql语句求最小可用id】相关文章:
★ 用户管理的备份(一致性备份、非一致性备份、脱机备份、联机备份)
★ Sql Server 和 Access 操作数据库结构Sql语句小结
★ 在ACCESS和SQL Server下Like 日期类型查询区别