大家都知道吧,这很坑,尤其是用惯了mysql里的自增字段设置,结果oracle里面没有的.oh,no 我用的是12c版本的,它有一个新特性,可以这样设置自增序列,在创建表是,把id设置为自增序列 create table t ( id number generated by default as identity (start with 1 increment by 1), name varchar2(20), password varchar2(20), Constraint Pk_
转眼间,这一年又结束了,再记录一点知识吧 同事说他有好多shapefile,想给每个shapefile添加一字段,并设置该字段的内容为shapefile文件名,想着用arcpy实现,于是有了下面的代码 import os import arcpy arcpy.env.workspace = r"F:\workspace\2017\other" fcs = arcpy.ListFeatureClasses() for fc in fcs: arcpy.AddField_managemen
[Key] //主键 [DatabaseGenerated(DatabaseGeneratedOption.Identity)] //设置自增 public int id { get; set; } [ForeignKey("category")] //外键 public int categoryid { get; set; } public Category category { get; set; }