I have a column in my sql table which is an identifier and i want to find the missing sequence in that column@@##
Please help me out as this might get me a scholarship.@@##
Hi,
try the following query...
-
select t.sno
-
from
-
( select row_number() over (order by Column_Name) as sno
-
from Table_Name ) as t
-
where t.sno not in (select Column_Name from Table_Name)
-
here we are generating a serial number on the key column and retrieving the serial numbers which are not there in the table... which means missing sequences
thanks