Search This Blog

Thursday, August 11, 2011

In table we have no identity number then create row id in table run time

SELECT t.* FROM (SELECT *, Row_Number() OVER(ORDER BY userid) AS RowNumber FROM table_user) t WHERE t.RowNumber % 2 = 0

No comments :