Mybatis常用查找的总结
来源:互联网 发布:拉普拉斯矩阵 编辑:程序博客网 时间:2024/05/16 09:27
1.添加数据返回自增的id字段
<!-- 添加演出厅信息 --> <insert id="addStudio" parameterType="Studio" useGeneratedKeys="true" keyProperty="studio_id" > insert into studio (studio_name,studio_row_count,studio_col_count ,studio_introduction ) values( #{studio_name},#{studio_row_count},#{studio_col_count},#{studio_introduction} ) </insert>
获取时的代码:
Studio stu=new Studio();if (stuDao.addStudio(stu) == 1) {int id=stu.getStudioId();//获取到id}
2.mysql查找奇数列数据值:
select parking_id from parking_lot ,(select @rownum :=0) test where (@rownum :=@rownum+1)%2=1;
阅读全文
0 0
- Mybatis常用查找的总结
- jQuery常用的元素查找方法总结
- jQuery常用的元素查找方法总结
- jQuery常用的元素查找方法总结
- jQuery常用的元素查找方法总结
- jQuery常用的元素查找方法总结
- jQuery常用的元素查找方法总结
- jQuery常用的元素查找方法总结
- jQuery常用的元素查找方法总结
- jQuery常用的元素查找方法总结
- jQuery常用的元素查找方法总结
- jQuery常用的元素查找方法总结
- jQuery常用的元素查找方法总结
- jQuery常用的元素查找方法总结 .
- jQuery常用的元素查找方法总结
- jQuery常用的元素查找方法总结
- Query常用的元素查找方法总结
- jQuery常用的元素查找方法总结
- 网络流-割的概念以及定理
- Could not load driverClass oracle.jdbc.driver.OracleDriver
- Vue之父组件向子组件传递数据
- 1
- CPU架构及指令集之研究
- Mybatis常用查找的总结
- 2
- 真Unity3d_基于profiler的优化
- iOS学习之路--通过APP边学编写(二)搭建基础的开发环境
- 创建索引的两种方式比对
- 加速度计和陀螺仪
- 从Eclipse切换到IDEA后需要做的事情
- SharedPreferences基本介绍
- 第二十六天 jsp+servlet+mysql写的一个登录验证