Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copying table
Message
 
À
25/04/2007 14:39:31
Issam Mansour
Jordan Business Machines
Amman, Jordanie
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01219823
Message ID:
01219899
Vues:
13
>I issued the following:-
>
>insert into yearly1 select * from yearly
>
>I get the following message:-
>Msg 8101, Level 16, State 1, Line 1
>An explicit value for the identity column in table 'yearly1' can only be specified when a column list is used and IDENTITY_INSERT is ON.
>
>SET IDENTITY_INSERT yearly1 OFF
>insert into yearly1 select * from yearly
>
>The following message apper:-
>
>Msg 8101, Level 16, State 1, Line 3
>An explicit value for the identity column in table 'yearly1' can only be specified when a column list is used and IDENTITY_INSERT is ON.

When dealing with identity columns, SQL requires that you specify all of the column names in the insert statement..

insert into yearly1 (columnname1,columnname2,...) select columnname1, columnname2,... from yearly
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform