时间:2021-07-01 10:21:17 帮助过:26人阅读
String dateNow= DateTime.Now.ToString("yyyyMMddhhmmss"+ new Random().Next(1, 99)); //随机数
StringBuilder sqlStr = new StringBuilder();
//1.添加年卡基础信息,获得自增ID
sqlStr.Append(" insert a set a.id=1; select @@IDENTITY " ,
//自增id
int num = int.Parse(Shove.Database.MySQL.ExecuteScalar(sqlStr.ToString()).ToString());
mysql 返回自增id
标签:随机 exec 添加 app sel builder ring uil datetime