select * from Emp where Empid not in (select top ((select count(*) from Emp)-1)Empid from Adhoc_Emp)
Login to post response