[SQL Server] Insert - imposer un identifiant
Bonjour à tous,
J'aimerais savoir si c'est possible d'inseré un nouvel élément en lui imposant un identifiant.
En fait dans ma table, j'ai plusieurs champs avec des identifiants. Certains champs ont été supprimés donc il y a des trous au niveau des identifiants. Genre j'ai une liste d'identifiant qui fait: 11-12-13-......-19 donc entre 13 et 19 j'ai un vide. Je veux donc inséré mon nouveau champs par exemple avec l'identifiant 14. Comment je fait?
J'ai essayé en faisant:
Code:
1 2
|
insert into matable values ('monnom','monprenom','identifiant') |
Mais j'ai une erreur
Citation:
An explicit value for the identity column in table 'matable' can only be specified when a column list is used and IDENTITY-INSERT is on
Merci pour vos lumières. :idea: