HomeTRICKY SQL INTERVIEW QUESTIONHow to Generate Sequence without using Ranking functions in SQL Server? How to Generate Sequence without using Ranking functions in SQL Server? 0 Vikas 01:06 Ans: Spose you have a temp table with only one column 'A' as above, Now you can use following query to generate sequence SELECT COUNT(*) OVER(ORDER BY A, CONCAT(A,NEWID())) RN, A FROM #temp1 Tags SQL SERVER INTERVIEW QUESTIONS TRICKY SQL INTERVIEW QUESTION Newer Older