zl程序教程

您现在的位置是:首页 >  其它

当前栏目

insert select 主键

SELECT 主键 INSERT
2023-09-11 14:17:05 时间
 string insertAllotSql = string.Format("INSERT INTO `comm_offer_allot` (`offer_id`, `from_type`, `from_id`, `offer_point`, `user_id`, `create_time`) VALUES ({0}, {1}, {2},{3},{4}, {5});select @@IDENTITY  as id;", offerAllot.OfferId, offerAllot.FromType, LibSysUtils.QuoteStr(offerAllot.FromId), offerAllot.OfferPoint, LibSysUtils.QuoteStr(offerAllot.UserId), offerAllot.CreateTime);
            return LibSysUtils.ToInt64(conn.ExecuteScalar(insertAllotSql));