Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to add record number in sqlserver
Message
De
21/07/2012 10:44:32
 
 
À
21/07/2012 09:48:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01548942
Message ID:
01548944
Vues:
79
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform