primarykey

  • 网络主关键字
primarykeyprimarykey
  1. On top of the declaration of id , add the annotation @ PrimaryKey .

    在id声明的顶部,添加注释@PrimaryKey。

  2. 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 .

    当你为确定一个列为数据表的主键的时候,表会自动为该列设置非空的属性。