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));
相关文章
- MySQL使用select查询时,在查询结果中增加一个字段并指定固定值
- Django-select_related优化查询
- mysql select into 不支持
- [Angular 2] ng-model and ng-for with Select and Option elements
- [D3] 11. Basic D3 chart interactivity on(), select(this), classed(class, trueorfalse)
- Sql查询原理与Select执行顺序(详细)
- jquery获取select标签的选中元素(整理)
- iview的Select控制value为数字类型时表单验证无法通过
- MySQL的SELECT ...for update
- mysql事务,select for update,及数据的一致性处理