Is there a way to do something equivalent to the following in a SQL select statement (either ANSI SQL or Transact-SQL is fine):
SELECT ROWNUMBER(), Name FROM SomeTable
Which would then print out:
1 Tom 2 Jack
(And yes I know that an identity column would result in the same output, but there's no identity on the table I have to work with and I can't change it, so that's not an option. Also I DO need it on the DB side, NOT after it's returned.)
I know "ROWNUMBER" doesn't exist, but is there any way to get that info inside the select as it's building?