does sqlserver have the funtion as same as recno() of vfp?
if not,how can i get the unique numbe of each record?
for example in vfp i can do like this
select *,recno() from tablename
if not,how can i get the unique numbe of each record?
for example in vfp i can do like this
select *,recno() from tablename
Why do you need them? If you want Recno() you can get a recordset from SQL Server using SELECT-SQL and your favorite data access method (CursorAdapter, Remote Views, SQL-Passthrough), that is using ODBC or OleDB and once you have a local VFP cursor, maybe shoing it in a grid you have VFP record numbers.
HTH
About the only way to achieve this with a single statement in T-SQL is to use a self-join... there are also other ways to achieve this in SQL Server using more than one line:
http://databasejournal.com/features/mssql/article.php/10894_2244821_2
...as Alex has already pointed out, depending on your application, the best way to do this would be in VFP.
P.S. Bear in mind though that both VFP and SQL Server support Identity fields, so this may also provide you with another option/solution.