使用mybats经常要用到批量修改或者删除,贴出批量修改的代码.如果是批量删除,可将update换成delete. <update id="changestatus" parameterType="String"> update apply_for_maintenance set status= 1 where afmid in <foreach item="afmid" index=&
Oracle 批量修改字段长度 SELECT 'alter table '||a.table_name||' MODIFY '||A.COLUMN_NAME||' VARCHAR2(100);' , A.table_name,A.COLUMN_NAME,A.DATA_TYPE,A.DATA_LENGTH,A.* from user_tab_columns A WHERE A.COLUMN_NAME='CREATE_USER' AND a.DATA_LENGTH<=20:
一.正式环境操作注意事项: .关闭应用访问或者设置数据库只读 mysql设为只读方法: 开启只读: mysql> show global variables like "%read_only%"; #查看相关参数,OFF为关,ON为开,默认为OFF mysql> flush tables with read lock; mysql> ; 关闭只读: mysql> unlock tables; mysql> ; mysql> show global v
一.实例介绍 SQL语句大小写到底是否区分呢?我们先从下面的这个例子来看一下: 例: --> 创建表,插入数据: declare @maco table (number int,myvalue varchar(2)) insert into @maco select 1,'aa' union all select 2,'Aa' union all select 3,'aA' union all select 4,'AA' --不区分大小写 select * from @maco WHERE nn
摘自: http://blog.csdn.net/myjlvzlp/article/details/8434376 1.批量添加元素session.insert(String string,Object o) public void batchInsertStudent(){ List<Student> ls = new ArrayList<Student>(); for(int i = 5;i < 8;i++){ Student student = new Student(
1.批量添加元素session.insert(String string,object O) public void batchInsertStudent(){ List<Student> ls = new ArrayList<Student>(); for(int i = 5;i < 8;i++){ Student student = new Student(); student.setId(i); student.setName("maoyuanjun"