比如说注册后自动编号给出1001的主键,后面插入的新数据1002,1003,依次递增下去,用visual studio做前端时又怎么显示出来
在 Sql Server 中字段属性里,有一项 identity specification ,指定 identity seed 为1000,identity Increment 为 1 ,则插入数据后,自动从 1001,1002自动赋值该字段。你查询结果中包含这个字段就可以显示出来。