1.表结构 create table t_student( id ) primary key, name ), birthday date ); increment ; insert into t_student values(seq_t_student.nextval,'张三',sysdate); insert into t_student values(seq_t_student.nextval,'李四',to_date('1990-01-01 13:13:13','yyyy-mm-dd h
一个需求,做个监控脚本,监控一个表,把数据拉出了,处理一下,组成一个新的脚本,并执行. 直接上脚本: #!/bin/bash VALUE=`sqlplus "scott/trigger@orcl" << ! set heading off set feedback off set pagesize set verify off set echo off select id,name,code,sex,age from t_people; exit !` for i in $
String juniorApprovalUserHql = "select c.id,c.username from UserInfo c left join c.userRole where c.userRole.id = 16"; List<UserInfo> juniorApprovalUser = accountService.find(juniorApprovalUserHql); jdk1.8,tomcat8
1.序列的语法形式 create sequence 序列名 increment by n start with n maxvalue n | nomaxvalue minvalue n | nominvalue cycle | nocycle cache n | nocache 序列以(start with n)为第一个序列的值,序列各值之间的间隔为(increment by n),序列的最大值为(maxvalue n),序列的最小值为(minvalue n)cycle表示如果序列的值大于最大值
#{}:是以预编译的映射,将参数设置到sql语句中,和jdbc的preraredStatement一样,使用占位符,防止sql注入. ${}:取出的值会直接拼装在sql中,会有安全问题. 大多数情况下的参数取值,我们都要用#{}的方式取值. 但是原生jdbc不支持占位符的地方,例如:分表,排序等等...我们可以使用${} 分表:比如按照年份的分表查询员工绩效等等如下: select * from ${year}_table a where 1=1 order by a.age ${desc}