Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to add record number in sqlserver
Message
From
21/07/2012 10:44:32
 
 
To
21/07/2012 09:48:06
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01548942
Message ID:
01548944
Views:
75
>in vfp i do :
>replace all myfield with recno()
>
>and the command re-number the field.
>
>how can i do it in sqlserver ?

SQL does not have the concept of a record number in the way that VFP does. Why do you want to do this ?
You can assign successive integers to each record but they will be in no particular order:
DECLARE @incrementer int
SET @incrementer=0
UPDATE MyTable SET @incrementer = myfield = @incrementer+1
Previous
Reply
Map
View

Click here to load this message in the networking platform