c++ - 使用 Microsoft 的可扩展存储引擎创建一个唯一的、自动分配的变量

标签 c++ database extensible-storage-engine

我正在使用可扩展存储引擎并想要一个唯一的列(32 位宽)。我需要此列中的值由数据库自动分配

我希望找到可以屏蔽的类似 JET_bitIndexUnique 的东西?

如果没有这样的面具,实现目标的正确方法是什么?

最佳答案

请参阅:Version, Auto-Increment and Escrow Columns

Auto increment columns are automatically incremented by ESE when a new record is inserted into the table. The value contained in the auto-increment column is unique for every record in the table and is not guaranteed to be continuous. These values are not recycled, but can be reused in certain cases. Only columns of type JET_coltypLong (Long) and JET_coltypLongLong (Currency) may be auto increment columns.

维基:Extensible Storage Engine

关于c++ - 使用 Microsoft 的可扩展存储引擎创建一个唯一的、自动分配的变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2301363/

相关文章:

php - Laravel belongsToMany 关系在两个表上定义本地键

mysql - Laravel 5.1 - 连接到 MySQL 数据库 (MAMP)

database - 如何使可扩展存储引擎数据库收缩? - 数据库里面不应该有太多数据吗?

c++ - 在自定义堆栈分配器中释放内存

c++ - 是否可以使 C++ 类成为 Objc 类的委托(delegate)?

c++ - 静态成员变量如何影响对象大小?

c++ - 删除 C++ 中的尾随逗号

sql - 数据库导入错误语法

database - 在 ESE (JetBlue) 中有没有办法限制使用多个键的搜索?