Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert Row Id's
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Divers
Thread ID:
01370506
Message ID:
01370518
Vues:
24
>
>
>INSERT INTO AlertImport
>		(Active,
>		ExpiredDate,
>		ContractNo,
>		SystemId,
>		ItemNumber,
>		Description,
>		Price,
>		ContractSeverityCode,
>		EquipmentSerialNumber,
>		LineType,
>		AddressCode)
>	SELECT Active,
>		   ExpiredDate,
>		   ContractNo,
>		   SystemId,
>		   ItemNumber,
>		   Description,
>		   Price,
>		   ContractSeverityCode,
>		   EquipmentSerialNumber,
>		   LineType,
>		   AddressCode
>	FROM AlertImport
>
If identity is the first field, you don't have to specify all fields.

You also could have simply ALTER the table to add identity column. I thought of this, but needed to be interrupted for something, so could not test right away.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform