本文主要是介绍近日遇到数据库及其他问题,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
一、查找备份表和原表不一样数据
select * from A where (select count(1) from A_BAK where A.ID=A_BAK.ID) = 0
二、在数据量比较大的表中新增有默认值的列速度较慢问题
使用 以下语句,在上亿数据的表中执行速度较慢
alter table TEST add col_a integer DEFAULT 0
可使用下面两种方式
alter table TEST add col_a integer DEFAULT 0 not null;
或者
alter table TEST add col_b integer;
alter table TEST modify col_b integer DEFAULT 0;
三、编译class文件java.lang.NoSuchFieldException: cacheList问题
在编译完class文件,替换war包里面对应class文件后,报Could not reload resource bundles java.lang.NoSuchFieldException: cacheList,找不到对应action,在网上查找资料,发现可能是JDK版本问题,原来使用JDK8 编译有问题,替换为JDK1.6编译,替换class文件后正常。
com.opensymphony.xwork2.util.logging.commons.CommonsLogger error Could not reload resource bundlesjava.lang.NoSuchFieldException: cacheListat java.lang.Class.getDeclaredFieldImpl(Native Method)at java.lang.Class.getDeclaredField(Class.java:575)at com.opensymphony.xwork2.util.LocalizedTextUtil.clearMap(LocalizedTextUtil.java:835)at com.opensymphony.xwork2.util.LocalizedTextUtil.reloadBundles(LocalizedTextUtil.java:794)at com.opensymphony.xwork2.util.LocalizedTextUtil.reloadBundles(LocalizedTextUtil.java:780)at com.opensymphony.xwork2.util.LocalizedTextUtil.findDefaultText(LocalizedTextUtil.java:205)at com.opensymphony.xwork2.util.LocalizedTextUtil.findDefaultText(LocalizedTextUtil.java:227)at org.apache.struts2.impl.StrutsActionProxy.getErrorMessage(StrutsActionProxy.java:70)at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:185)at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:63)at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:58)at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:553)at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:125)at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:125)at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:80)at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:997)at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilters(DefaultExtensionProcessor.java:1079)at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:999)at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3954)at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:945)at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592)at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:191)at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:453)at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:515)at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:306)at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:277)at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)at com.ibm.io.async.AsyncChannelFuture$1.run(AsyncChannelFuture.java:205)at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1656)
四、获取文件编码格式
java如何判断文件的编码格式_mob64ca12e36a1d的技术博客_51CTO博客
五、利用Oracle判断表是否存在
利用Oracle判断表是否存在的方法与技巧_笔记大全_设计学院
这篇关于近日遇到数据库及其他问题的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!