var name = "额昂"; sql = string.Format(@"insert into T_#Ceshi (Name) values ('{0}');select @@identity;", name); int ID = int.Parse(SqlHelper.ExecuteScalarText(sql).ToString());
ID 为1,第二次为2,当前插入数据自增ID