sql语句,多谢

求一个sql语句,谢谢

有这样一组数据,我想获取该列的最大数字,注意是003而不是999,因为中间有一部分数字没有被利用,我想利用起来,请问这样的sql语句怎么写啊,谢谢

001

002

003

997

998

999



获取该列的最大数字 建议重修你的汉语。

SQL code

select min(col) from xxx where col+1 not in (select col from xxx)


SELECT min(a.id) from tt5 a left join tt5 b on 0+a.id=0+b.id-1 where b.id is null
sql语句,多谢

相关文章:

你感兴趣的文章:

标签云: