oracle操作

1.安装oracle

2.用sys登录

3.新建用户

4.给新用户授权

5.新用户登录

6.建表

7.建序列,建触发器(实现主键自增长)

 

 

-----二层嵌套的清单查询(有错)

select ID,BDBM,BDR,T_MARKER,T_DATE,T_NAME,T_BMMC,T_CHECK,T_STATUS from (select ID,BDBM,BDR,T_MARKER,T_NAME,T_BMMC,T_CHECK,T_STATUS,to_char(T_DATE,'yyyy-mm-dd') as T_DATE,rownum rn from JCDA_HEAD where 1=1 "+filtersql+" and rownum<="+(intPage*intPageSize)+" order by ID desc) t where rn>="+ ((intPage-1)*intPageSize+1) +" order by t.ID desc ";

-------三层嵌套的清单查询(对)

 

"select ID,BDBM,BDR,T_MARKER,T_DATE,T_NAME,T_BMMC,T_CHECK,T_STATUS from (select ID,BDBM,BDR,T_MARKER,T_NAME,T_BMMC,T_CHECK,T_STATUS,to_char(T_DATE,'yyyy-mm-dd') as T_DATE,rownum rn  from (select * from  JCDA_HEAD where 1=1 "+filtersql+" order by ID asc) where  rownum<="+(intPage*intPageSize)+") t where rn>="+ ((intPage-1)*intPageSize+1) +" order by t.ID asc "

你可能感兴趣的:(oracle)