insert语句返回int
时间: 2023-08-31 20:13:56 浏览: 207
回答: insert语句返回int是指在执行insert语句后,会返回一个表示插入成功的整数值。这个整数值通常表示插入的行数。在引用\[2\]中的代码示例中,可以看到在执行插入操作后,通过打印输出t.getId()来获取插入的键值。这个键值是在插入操作执行完后自动生成的,并且被设置到了传入的参数对象中。所以在这个例子中,可以通过t.getId()来获取插入的键值。
#### 引用[.reference_title]
- *1* [BaseMapper insert的返回值是什么](https://blog.csdn.net/weixin_35755640/article/details/128874166)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [(十五)insert](https://blog.csdn.net/jiangshangchunjiezi/article/details/90639250)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [Insert语句返回主键](https://blog.csdn.net/huan1213858/article/details/124485604)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文