-- Collection of code snippets by Arne Vajhøj 
-- posted to eksperten.dk, usenet and other places (2002-now) 
SELECT @rownum:=@rownum+1 AS row,t1.* FROM t1,(SELECT @rownum:=0) x
