Interview Question in Microsoft Transact-SQL


 

Interview Question :: Can I print out the row number for each row in Sybase


I am looking to print out the row number of each row in a Sybase (T-SQL) stored procedure. For example:

CREATE PROCEDURE dbo.Info
AS
BEGIN
select ROW NUMBER, date, name, desc from ProblemTb
END
Answers to "Can I print out the row number for each row in Sybase"
RE: Can I print out the row number for each row in Sybase?

Rows in a table has no order.

You can obtain ROW NUMBER only in the case of using ORDER BY clause.

I can write solution if you'll depict desired ordering.
 
Vote for this answer ::  
Update Alert Setting