Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Carol --
The smallest unit of value in DATETIME() is the second. So, if it's possible to generate more than 1 record in a second, you'll have a duplicate primary key. A REPLACE WITH DATETIME() will most do that.
As others have mentioned, it's best to enhance or change your PK generation. There are various options available, and the best really depends on your particular needs. You may be able to convert the DATETIME to a string and pre or postpend a workstation ID. However, if you do batch updates from one station, or need to seed an initial value, the process cannot run faster than 1 record per second. It may be preferable to use a unique ID generation program such as Craig has available.
Jay
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement