primarykey
- 网络主关键字
![primarykey](../cache/247385.jpg)
-
On top of the declaration of id , add the annotation @ PrimaryKey .
在id声明的顶部,添加注释@PrimaryKey。
-
When you identify a single DataColumn as the PrimaryKey for a DataTable , the table automatically sets the AllowDBNull property of the column to false and the Unique property to true .
当你为确定一个列为数据表的主键的时候,表会自动为该列设置非空的属性。