码迷,mamicode.com
首页 >  
搜索关键字:mybatis where    ( 33957个结果
Leetcode | Trapping Rain Water
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining....
分类:移动开发   时间:2014-05-19 19:20:26    阅读次数:332
多表查找
比较经典一个课程学分表C(cno, cname, ccredit)一个学生选课表SC(sno, cno, grade)select sno from sc,c where sc.cno=c.sno and sc.grade>=60 group by sno having sum(credit)>=3...
分类:其他好文   时间:2014-05-19 17:06:41    阅读次数:218
MySQL基础学习之数据查询
一般查询SELECT * FROM 表名SELECT 属性名 FROM 表名条件查询SELECT 属性名 FROM 表名 WHERE 条件表达式查询数据值1,数据值2的表单SELECT * FROM 表名 WHERE 属性名 [NOT] IN(数据值1,数据值2....)查询数值1,数据2的表单SE...
分类:数据库   时间:2014-05-18 20:34:19    阅读次数:368
update更新两个字段
update更新两个字段时的sql语句: update tj_record set is_recycle_reprint_guide='1' , recycle__guide_date=now() where id = #{record_id} 科室如果我将字段的“,”写成了and也不报错。但是更新不了。如图: 切记,更新多个字段时是以逗号分隔。...
分类:其他好文   时间:2014-05-18 18:36:18    阅读次数:294
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection
org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is o...
分类:数据库   时间:2014-05-18 06:19:21    阅读次数:547
SQL两表之间:根据一个表的字段更新另一个表的字段
1. 写法轻松,更新效率高: update table1 set field1=table2.field1, field2=table2.field2 from table2 where table1.id=table2.id   2. 常规方式,种写法相当于一个 Left join, 以外面的where为更新条数,如果不加where就是所有记录 update table1 s...
分类:数据库   时间:2014-05-18 06:05:00    阅读次数:294
mybatis使用小贴士
分享了以下tips: 一、事务管理 二、xml配置sql代码段 三、#和$的区别 四、注意对做转义 五、依据字符串是否为空,动态组织sql语句 六、使用自定义的类型转换器 七、resultMap的复用 一、事务管理 用户执行一个动作,后台需依次更新多个表,如果其中有一个更新失败,则要回滚之前的更新。这种情况,就是事务回滚。 要支持事务操作,需要: ...
分类:其他好文   时间:2014-05-18 04:05:57    阅读次数:291
反射用法
static void Main(string[] args) { var retul = GetListData("wang"); } public static List GetListData(string name) where ...
分类:其他好文   时间:2014-05-18 02:06:10    阅读次数:243
Mysql 高效随机生成N条记录
1 select *, rand() as random FROM yef_exercises where id not in(1) order by random limit 1 // Mysql
分类:数据库   时间:2014-05-17 18:58:42    阅读次数:370
SQL SERVER 报:由于数据移动,未能继续以 NOLOCK 方式扫描错误的解决办法。
比如在某个表中使用 select xxx from xxx with(nolock) where xxxx 查询。提示出错:由于数据移动,未能继续以NOLOCK方式扫描。 它有可能某些条件出错,某些条件不出错。原因是有可能该表在物理文件存储中某一块数据损坏了。或者该表中的索引和表的数据不一致了。解决...
分类:移动开发   时间:2014-05-17 18:26:48    阅读次数:746
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!