Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert a record in a table, which has identity column
Message
De
20/03/2003 09:00:47
 
 
À
19/03/2003 23:30:53
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
00757536
Message ID:
00768016
Vues:
28
>The best way is to set the column to Identity in the table designer. To get the identity value of a row that was just inserted, return @@IDENTITY from the stored procedure.

If you're using SQL Server 2000, SCOPE_IDENTITY() is better than @@IDENTITY.

-Mike

>
>>Hi everybody,
>>
>>Sorry for such naive question. If I want to insert data into the table, which has identity column, what can I do?
>>
>>Can I use statement similar to
insert into CreditInfo select * from CWebCreditLoad
, where CreditInfo would have one additional field (identity)?
>>
>>Thanks in advance.
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform