本来我也不喜欢iBatis,那是因为我当时还不怎么会用它,现在我想说,iBatis是个好东西,不信你试试看。下面是我在项目实践中对iBatis的一个小总结,希望帮助众多在疲于iBatis编码而无暇思考的苦工们找到一些偷懒的机会。
SqlMap的配置是iBatis中应用的核心。这部分任务占据了iBatis开发的70的工作量。
1、命名空间:
,在此空间外要引用此空...
分类:
数据库 时间:
2015-07-14 18:05:01
阅读次数:
119
oracle 常用sql语句1、查看表空间的名称及大小select t.tablespace_name, round(sum(bytes/(1024*1024)),0) ts_sizefrom dba_tablespaces t, dba_data_files dwhere t.tablespace...
分类:
数据库 时间:
2015-07-10 13:17:01
阅读次数:
234
select * from 表名where id = '226'and amt in ('1','10')and nbr='2'order by gmt desc;update 表名 set gmt=now() where nbr='20' 更新为现在时间update 表名 set gmt...
分类:
数据库 时间:
2015-07-06 12:06:06
阅读次数:
126
学生表 课程表 成绩表 教师表 50个常用sql语句建表Student(S#,Sname,Sage,Ssex) 学生表
Course(C#,Cname,T#) 课程表
SC(S#,C#,score) 成绩表
Teacher(T#,Tname) 教师表---- If database exists the same name datatable deletes it.
IF EXISTS(SEL...
分类:
数据库 时间:
2015-06-16 11:03:52
阅读次数:
239
SQL是(Structured Query Language)结构化查询语言的简称,下面赵一鸣随笔博客从基础知识、判断对象和应用技巧等方面,介绍了SQL的应用方法。
基础
创建数据库
创建之前判断该数据库是否存在
if exists (select * from sysdatab...
分类:
数据库 时间:
2015-05-26 14:18:07
阅读次数:
239
【1】清空表语句
truncate table fke_message;
【2】重设自增字段起始值
alter table fke_message auto_increment = 10001;
【3】常用建表语句
DROP TABLE IF EXISTS `fke_message`;
CREATE TABLE `fke_message` (
`id` i...
分类:
数据库 时间:
2015-05-06 21:13:58
阅读次数:
179
--删除主键alter table 表名 drop constraint 主键名--添加主键alter table 表名 add constraint 主键名 primary key(字段名1,字段名2……)--添加非聚集索引的主键alter table 表名 add constraint 主键名 ...
分类:
数据库 时间:
2015-05-05 12:12:59
阅读次数:
191
目录1、SQL语句分类2、DDL语句3、DML语句4、DCL语句5、事务相关语句6、mysql查询 6.1、单表简单查询 6.2、多表组合查询 6.2.1、联结查询(交叉联结,内联结,外联结(左外联结、右外联结)) 6.2.2、联合查询(UNION) 6.2.3、内联结 6....
分类:
数据库 时间:
2015-04-22 13:21:04
阅读次数:
202
多对多判断select a.* from Temp2 a (nolock) where not exists(select * from Temp1 where 年月=a.年月 and 水表代码=a.水表代码 and 水价分类=a.水价分类) order by 小计SELECT * FROM ...
分类:
数据库 时间:
2015-04-10 19:40:00
阅读次数:
185