后端使用的数据库是oracle,数据操作用的是hibernate。
oracle的客户端需要配置ip地址,端口,服务名,用户名,密码。
oracle的服务端的配置:
jndi.jndiName=jdbc/bqms jdbc.driver=oracle.jdbc.driver.OracleDriver jdbc.url=jdbc:oracle:thin:@0.0.0.0:1521:服务名 jdbc.username=admin jdbc.password=123456 hibernate.dialect=org.hibernate.dialect.Oracle10gDialect hibernate.show_sql=true hibernate.generate_statistics=true hibernate.jdbc.batch_size=20 hibernate.current_session_context_class=org.springframework.orm.hibernate4.SpringSessionContext hibernate.mappingLocations=classpath*:com/saicmotor/bqms/**/po/*.hbm.xml hibernate.hbm2ddl.auto=validate hibernate.temp.use_jdbc_metadata_defaults=false
oracle 创建序列以及查询序列
create sequence SEQ_XXXX_ID
minvalue 1000000
maxvalue 999999999
start with 1000120
increment by 1
cache 10
order;
select SEQUENCE_OWNER,SEQUENCE_NAME from dba_sequences where SEQUENCE_NAME='SEQ_XXXX_ID'
oracle添加字段sql
alter table tableName add 字段名 类型;
comment on column tableName.字段名
is '注释';
修改字段
alter table tableName modify staff_no varchar2(64);