排行榜

  • 用户榜
  • 标签榜
  • 冲榜分奖金

频道

最新最热悬赏待采纳 筛选
  • 0

    回答

  • 5

    浏览

想实现的功能是插入前需要满足表A和表B中存在某字段两个条件,两个条件满足时才执行插入 IF EXISTS (select * from criminal_info where criminal_info.criminal_id='123456') AND exists (select * from criminal_families_info where criminal_families_info.user_id='123')then begin insert into criminal_families_relationship (`user_id`,`user_bind_id`,`user_name`) values( '123','456','tom'); end 执行语句时报错,根据网上的说法使用delimiter更换间隔符也无法解决,小白求大佬解惑

  • 1

    回答

  • 5

    浏览

触发器语句如下: CREATE TRIGGER users_login AFTER INSERT ON users_online FOR EACH ROW UPDATE phone_users SET isdisable = NEW.isdisable WHERE phone = NEW.phone; 插入语句如下: insert into criminal_families_relationship (`user_id`,`user_bind_id`,`user_name`) select '123','456','tom' from dual where exists (select * from criminal_info where criminal_info.criminal_id='1236'); 执行插入语句时有如下报错: 1442 - Can't update table 'phone_users' in stored function/trigger because it is already used by statement which invoked this stored function/trigger 插入时不带去重则不会报错,求解是什么问题

  • 0

    回答

  • 5

    浏览

主从复制时,选择那种方式? binlog   和 GTID 选哪一个? 优缺点?

  • 1

    回答

  • 6

    浏览

所有的项目有启动不了都有Server Tomcat v8.5 Server at localhost failed to start.难道是我用了JUtils单元测试,运行其他项目就报错了该怎么办呢?Server Tomcat v8.5 Server at localhost failed to start.报错(子容器启动失败该怎么办) 有的还出现 运行报错是这样的 五月 07, 2021 6:17:46 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Server.服务器版本: Apache Tomcat/9.0.45 五月 07, 2021 6:17:46 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: 服务器构建: Mar 30 2021 10:29:04 UTC 五月 07, 2021 6:17:46 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: 服务器版本号: 9.0.45.0 五月 07, 2021 6:17:46 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: 操作系统名称: Windows 10 五月 07, 2021 6:17:46 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: OS.版本: 10.0 五月 07, 2021 6:17:46 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: 架构: amd64 五月 07, 2021 6:17:46 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Java 环境变量: C:\Program Files\Java\jdk1.8.0_131\jre 五月 07, 2021 6:17:46 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Java虚拟机版本: 1.8.0_131-b11 五月 07, 2021 6:17:46 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: JVM.供应商: Oracle Corporation 五月 07, 2021 6:17:46 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: CATALINA_BASE: D:\javaEE\apache-tomcat-9.0.45 五月 07, 2021 6:17:46 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: CATALINA_HOME: D:\javaEE\apache-tomcat-9.0.45 五月 07, 2021 6:17:46 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: 命令行参数: -Dcatalina.base=D:\javaEE\apache-tomcat-9.0.45 五月 07, 2021 6:17:46 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: 命令行参数: -Dcatalina.home=D:\javaEE\apache-tomcat-9.0.45 五月 07, 2021 6:17:46 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: 命令行参数: -Dwtp.deploy=D:\javaEE\apache-tomcat-9.0.45\wtpwebapps 五月 07, 2021 6:17:46 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: 命令行参数: -Djava.endorsed.dirs=D:\javaEE\apache-tomcat-9.0.45\endorsed 五月 07, 2021 6:17:46 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: 命令行参数: -Dfile.encoding=UTF-8 五月 07, 2021 6:17:46 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent 信息: 使用APR版本[1.7.0]加载了基于APR的Apache Tomcat本机库[1.2.27]。 五月 07, 2021 6:17:46 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent 信息: APR功能:IPv6[true]、sendfile[true]、accept filters[false]、random[true]。 五月 07, 2021 6:17:46 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent 信息: APR/OpenSSL配置:useAprConnector[false],useOpenSSL[true] 五月 07, 2021 6:17:46 下午 org.apache.catalina.core.AprLifecycleListener initializeSSL 信息: OpenSSL成功初始化 [OpenSSL 1.1.1k 25 Mar 2021] 五月 07, 2021 6:17:47 下午 org.apache.coyote.AbstractProtocol init 信息: 初始化协议处理器 ["http-nio-8181"] 五月 07, 2021 6:17:47 下午 org.apache.catalina.startup.Catalina load 信息: 服务器在[1429]毫秒内初始化 五月 07, 2021 6:17:47 下午 org.apache.catalina.core.StandardService startInternal 信息: 正在启动服务[Catalina] 五月 07, 2021 6:17:47 下午 org.apache.catalina.core.StandardEngine startInternal 信息: 正在启动 Servlet 引擎:[Apache Tomcat/9.0.45] 五月 07, 2021 6:17:49 下午 org.apache.jasper.servlet.TldScanner scanJars 信息: 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。 五月 07, 2021 6:17:49 下午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info 信息: Parsing configuration file [struts-default.xml] 五月 07, 2021 6:17:49 下午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info 信息: Unable to locate configuration files of the name struts-plugin.xml, skipping 五月 07, 2021 6:17:49 下午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info 信息: Parsing configuration file [struts-plugin.xml] 五月 07, 2021 6:17:49 下午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info 信息: Parsing configuration file [struts.xml] 五月 07, 2021 6:17:50 下午 org.apache.jasper.servlet.TldScanner scanJars 信息: 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。 五月 07, 2021 6:17:51 下午 org.apache.jasper.servlet.TldScanner scanJars 信息: 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。 五月 07, 2021 6:17:52 下午 org.apache.jasper.servlet.TldScanner scanJars 信息: 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。 五月 07, 2021 6:17:52 下午 org.apache.catalina.core.ContainerBase startInternal 严重: 子容器启动失败 java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: 无法启动组件[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/4]] at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:433) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.startup.Catalina.start(Catalina.java:772) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473) Caused by: org.apache.catalina.LifecycleException: 无法启动组件[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/4]] at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) ... 21 more Caused by: java.lang.NoClassDefFoundError: HttpServletRequest at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) at java.lang.Class.getDeclaredMethods(Class.java:1975) at org.apache.catalina.util.Introspection.getDeclaredMethods(Introspection.java:121) at org.apache.catalina.startup.WebAnnotationSet.loadMethodsAnnotation(WebAnnotationSet.java:285) at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:138) at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:69) at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:332) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:989) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:303) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5077) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ... 27 more Caused by: java.lang.ClassNotFoundException: HttpServletRequest at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1364) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187) ... 40 more 五月 07, 2021 6:17:52 下午 org.apache.catalina.core.ContainerBase startInternal 严重: 子容器启动失败 java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: 无法启动组件[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/8.03]] at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:433) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.startup.Catalina.start(Catalina.java:772) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473) Caused by: org.apache.catalina.LifecycleException: 无法启动组件[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/8.03]] at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) ... 21 more Caused by: java.lang.NoClassDefFoundError: HttpServletRequest at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) at java.lang.Class.getDeclaredMethods(Class.java:1975) at org.apache.catalina.util.Introspection.getDeclaredMethods(Introspection.java:121) at org.apache.catalina.startup.WebAnnotationSet.loadMethodsAnnotation(WebAnnotationSet.java:285) at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:138) at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:69) at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:332) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:989) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:303) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5077) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ... 27 more Caused by: java.lang.ClassNotFoundException: HttpServletRequest at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1364) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1187) ... 40 more 五月 07, 2021 6:17:52 下午 org.apache.catalina.core.ContainerBase startInternal 严重: 子容器启动失败 java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: 子容器启动失败 at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:433) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.startup.Catalina.start(Catalina.java:772) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473) Caused by: org.apache.catalina.LifecycleException: 子容器启动失败 at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:928) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) ... 13 more Caused by: org.apache.tomcat.util.MultiThrowable: 2 wrapped Throwables: [org.apache.catalina.LifecycleException: 无法启动组件[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/4]]][org.apache.catalina.LifecycleException: 无法启动组件[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/8.03]]] at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:920) ... 21 more 五月 07, 2021 6:17:52 下午 org.apache.catalina.startup.Catalina start 严重: 所必需的服务组件启动失败,所以无法启动Tomcat org.apache.catalina.LifecycleException: 子容器启动失败 at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:928) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:433) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.startup.Catalina.start(Catalina.java:772) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473) Caused by: java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: 子容器启动失败 at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:916) ... 13 more Caused by: org.apache.catalina.LifecycleException: 子容器启动失败 at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:928) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:843) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) ... 13 more Caused by: org.apache.tomcat.util.MultiThrowable: 2 wrapped Throwables: [org.apache.catalina.LifecycleException: 无法启动组件[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/4]]][org.apache.catalina.LifecycleException: 无法启动组件[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/8.03]]] at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:920) ... 21 more 五月 07, 2021 6:17:52 下午 org.apache.coyote.AbstractProtocol pause 信息: 暂停ProtocolHandler["http-nio-8181"] 五月 07, 2021 6:17:52 下午 org.apache.catalina.core.StandardService stopInternal 信息: 正在停止服务[Catalina] 五月 07, 2021 6:17:52 下午 org.apache.coyote.AbstractProtocol destroy 信息: 正在摧毁协议处理器 ["http-nio-8181"]  

  • 2

    回答

  • 40

    浏览

问一下各位大佬!!!运行mysql他说系统找不到指定的文件,看了一下说让我卸载mysqld重装 但我用管理员模式打开cmd输入mysqld _ _remove他说mysqld不是内部或外部命令,也不是可运行的程序 这种怎么办啊 求求好心人解答!!感谢感谢!

  • 0

    回答

  • 15

    浏览

explain SELECT     sp.*  FROM     yjdf_innerbuy_goods_spu sp     LEFT JOIN (SELECT ias.spu_id, max( ias.create_date ) create_date FROM yjdf_innerbuy_activity_sku ias WHERE ias.innerbuy_activity_id = 587611923729879040 GROUP BY ias.spu_id ) ias_tmp ON sp.id = ias_tmp.spu_id  WHERE     sp.gcm_delete = 0      AND sp.activity_id = 587611923729879040  ORDER BY     sp.activity_sort DESC,     ias_tmp.create_date DESC     ; 执行计划和相关表索引如下:  

回答 YANGYYID
采纳率0%
11小时前
  • 2

    回答

  • 13

    浏览

User是一个表,我对它用新建查询来写插入的代码,但它老提示User附近有语法错误,害

  • 2

    回答

  • 25

    浏览

1,用左外连接连接3个表创建视图 2,在上面视图的基础上创建个行列子集视图用的代码: create view v_stuinfo_1 as select * from v_stuinfo where sdept='cs' with check option; 会报错:[Err] 1368 - CHECK OPTION on non-updatable view 'school.v_stuinfo_1' 但步骤一中连接表的方式换为:....select 列1,列2... from 表1,表2,表3 where 表1.列a=表2.列a,and 表2.列b=表3.列b; 创建好视图再执行步骤2就可以创建成功了, 不是因为步骤1中使用临时表的问题 这是为什么?因为连接方式不同吗?希望大佬赐教!感谢!

  • 3

    回答

  • 13

    浏览

    如上面所示,截图一是通过工具查到的结果,截图二是通过mybatis-plus传参查询得到的结果,各位有谁碰到了,帮忙提供个解决方案,感谢  

  • 2

    回答

  • 23

    浏览

比如有两个字段editTime和createTime,如果editTime为空,就根据createTime排序,不为空则将这个editTime和其他数据的createTime或者editTime比较排序.. 简单点说就是类似于最新发的或者最新修改的帖子在最上面 目前想到的是通过另个一字段将两个时间汇总到一起再排序就可以 但是想知道如果不使用其他字段用mysql查询语句写是不是能够实现 谢谢大家

  • 4

    回答

  • 24

    浏览

//这个是测试的代码块 package dao.impl; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Test; import pojo.User; @SuppressWarnings("unused") class UserDaoTest { UserDao userDao=new UserDaoImpl(); @Test void testQueryUserByusername() { //fail("Not yet implemented"); if(userDao.queryUserByusername("admin123")==null) { System.out.println("用户名可用!"); } else { System.out.println("用户名已存在!"); } } @Test void testQueryUserByusernameAndpassword() { //fail("Not yet implemented"); if(userDao.queryUserByusernameAndpassword("admin","admin123")==null) {System.out.println("用户名或密码错误!登录失败!"); } else { System.out.println("查询成功!"); } } @Test void testSaveUser() { //fail("Not yet implemented"); //System.out.println(userDao.saveUser(new User(null,"admins","12d2888","w17f8@qq.com"))); System.out.println( userDao.saveUser(new User(null,"wzg168", "123456", "wzg168@qq.com"))); } } package dao.impl; import java.sql.Connection; import java.sql.SQLException; import java.util.List; import org.apache.commons.dbutils.QueryRunner; import org.apache.commons.dbutils.handlers.BeanHandler; import org.apache.commons.dbutils.handlers.BeanListHandler; import org.apache.commons.dbutils.handlers.ScalarHandler; import org.apache.jasper.compiler.NewlineReductionServletWriter; import utils.JdbcUtilss; @SuppressWarnings("unused") public abstract class BaseDao { //使用Jdbcutilss来操作数据库 private QueryRunner queryRunner=new QueryRunner(); //使用update方法执行insert和update与delete操作 public int update(String sql,Object...args) { Connection connection=JdbcUtilss.getConnection(); try { return queryRunner.update(connection, sql, args); //return queryRunner.update(connection,sql,args); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); }finally { JdbcUtilss.close(connection); } return -1; } /** * 查询返回一个 javaBean 的 sql 语句 * * @param type 返回的对象类型 * @param sql 执行的 sql 语句 * @param args sql 对应的参数值 * @param <T> 返回的类型的泛型 * @return * @return */ public <T> T queryForOne(Class<T>type,String sql,Object...args){ Connection conn=JdbcUtilss.getConnection(); try { return queryRunner.query(conn, sql, new BeanHandler<T>(type), args); } catch (Exception e) { // TODO: handle exception } finally { JdbcUtilss.close(conn); } return null; } /** * 查询返回多个 javaBean 的 sql 语句 * * @param type 返回的对象类型 * @param sql 执行的 sql 语句 * @param args sql 对应的参数值 * @param <T> 返回的类型的泛型 * @return */ public <T> List<T> queryForList(Class<T>type,String sql,Object...args){ Connection conn=JdbcUtilss.getConnection(); try { return queryRunner.query(conn, sql, new BeanListHandler<T>(type), args); } catch (Exception e) { // TODO: handle exception } finally { JdbcUtilss.close(conn); } return null; } //返回执行一个一行一列; public Object quarForStringValue(String sql,Object...args) { Connection con=JdbcUtilss.getConnection(); try { return queryRunner.query(con, sql, new ScalarHandler(),args); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { JdbcUtilss.close(con); } return null; } }     //接口 package dao.impl; import pojo.User; public interface UserDao { public User queryUserByusername(String username); //public User queryUserByUsername(String username); public User queryUserByusernameAndpassword(String username,String password); public int saveUser(User user); } package dao.impl; import pojo.User; public class UserDaoImpl extends BaseDao implements UserDao{ @Override public User queryUserByusername(String username) { // TODO Auto-generated method stub String sql="select`id`,`username`,`password`,`email` from t_user where username= ?"; return queryForOne(User.class, sql, username); } @Override public User queryUserByusernameAndpassword(String username, String password) { String sql="select`id`,`username`,`password`,`email` from t_user where username = ? and password = ?"; // TODO Auto-generated method stub return queryForOne(User.class, sql, username,password); } @Override public int saveUser(User user) { // TODO Auto-generated method stub /* * String sql="insert into t_user(`username`,`password`,`email`)value(?,?,?)"; * return update(sql, user.getUsername(),user.getPassword(),user.getEmail()); */ String sql = "insert into t_user(`username`,`password`,`email`)values(?,?,?)"; //return update(sql, user.getUsername(),user.getPassword(),user.getEmail()); return update(sql, user.getUsername(),user.getPassword(),user.getEmail()); } }   //类User package pojo; public class User { private Integer id; private String username; private String password; private String email; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } @Override public String toString() { return "User [id=" + id + ", username=" + username + ", password=" + password + ", email=" + email + ", getId()=" + getId() + ", getUsername()=" + getUsername() + ", getPassword()=" + getPassword() + ", getEmail()=" + getEmail() + ", getClass()=" + getClass() + ", hashCode()=" + hashCode() + ", toString()=" + super.toString() + "]"; } public User() { } public User(Integer id, String username, String password, String email) { super(); this.id = id; this.username = username; this.password = password; this.email = email; } }  

  • 2

    回答

  • 19

    浏览

package com.mydbconnect.test; import org.junit.Test; import com.mydbconnect.utils.JdbcUtils; public class JdbcUtilsTest { @Test public void testJdbcUtils() { System.out.println(JdbcUtils.getConnection()); } } getConnection时可以连通,但调用方法对数据库中的表进行操作的时候便出现以下问题 package com.mydbconnect.test; import org.junit.Test; import com.mydbconnect.dao.UserDao; import com.mydbconnect.daoimpl.UserDaoImpl; public class UserDaoTest { @Test public void queryUserByUsername() { UserDao userDao = new UserDaoImpl(); userDao.queryUserByUsername("admin"); }; @Test public void queryUserByUsernameAndPassword() { }; @Test public void saveUser() { }; }

回答 DeSt!ny
采纳率100%
昨天
  • 1

    回答

  • 8

    浏览

2021-05-06 17:14:54.939 ERROR 5988 --- [reate-867357061] com.alibaba.druid.pool.DruidDataSource   : create connection SQLException, url: jdbc:mysql://localhost:3306/d11125?useSSL=false&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&serverTimezone=Asia/Shanghai, errorCode 0, state 08001 java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.     at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110) ~[mysql-connector-java-8.0.18.jar:8.0.18]     at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) ~[mysql-connector-java-8.0.18.jar:8.0.18]     at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89) ~[mysql-connector-java-8.0.18.jar:8.0.18]     at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63) ~[mysql-connector-java-8.0.18.jar:8.0.18]     at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73) ~[mysql-connector-java-8.0.18.jar:8.0.18]     at com.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:906) ~[mysql-connector-java-8.0.18.jar:8.0.18]     at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:831) ~[mysql-connector-java-8.0.18.jar:8.0.18]     at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:456) ~[mysql-connector-java-8.0.18.jar:8.0.18]     at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:246) ~[mysql-connector-java-8.0.18.jar:8.0.18]     at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:199) ~[mysql-connector-java-8.0.18.jar:8.0.18]     at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:156) ~[druid-1.1.10.jar:1.1.10]     at com.alibaba.druid.filter.stat.StatFilter.connection_connect(StatFilter.java:218) ~[druid-1.1.10.jar:1.1.10]     at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:150) ~[druid-1.1.10.jar:1.1.10]     at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1560) ~[druid-1.1.10.jar:1.1.10]     at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1623) ~[druid-1.1.10.jar:1.1.10]     at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2468) ~[druid-1.1.10.jar:1.1.10] Caused by: com.mysql.cj.exceptions.CJException: Access denied for user 'root'@'localhost' (using password: YES)     at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:na]     at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:na]     at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:na]     at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[na:na]     at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) ~[mysql-connector-java-8.0.18.jar:8.0.18]     at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105) ~[mysql-connector-java-8.0.18.jar:8.0.18]     at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151) ~[mysql-connector-java-8.0.18.jar:8.0.18]     at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:129) ~[mysql-connector-java-8.0.18.jar:8.0.18]     at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:787) ~[mysql-connector-java-8.0.18.jar:8.0.18]     at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:712) ~[mysql-connector-java-8.0.18.jar:8.0.18]     at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:680) ~[mysql-connector-java-8.0.18.jar:8.0.18]     at com.mysql.cj.protocol.a.NativeProtocol.checkErrorMessage(NativeProtocol.java:128) ~[mysql-connector-java-8.0.18.jar:8.0.18]     at com.mysql.cj.protocol.a.NativeAuthenticationProvider.proceedHandshakeWithPluggableAuthentication(NativeAuthenticationProvider.java:540) ~[mysql-connector-java-8.0.18.jar:8.0.18]     at com.mysql.cj.protocol.a.NativeAuthenticationProvider.connect(NativeAuthenticationProvider.java:202) ~[mysql-connector-java-8.0.18.jar:8.0.18]     at com.mysql.cj.protocol.a.NativeProtocol.connect(NativeProtocol.java:1340) ~[mysql-connector-java-8.0.18.jar:8.0.18]     at com.mysql.cj.NativeSession.connect(NativeSession.java:157) ~[mysql-connector-java-8.0.18.jar:8.0.18]     at com.mysql.cj.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:850) ~[mysql-connector-java-8.0.18.jar:8.0.18]     ... 10 common frames omitted

回答 南宫云夜
采纳率50%
昨天
  • 2

    回答

  • 23

    浏览

sql语句的sum函数只能求和两条及以上的数据 但是我有一些只有一条数据,应该怎么求和?

回答 27304098
采纳率0%
昨天
  • 4

    回答

  • 15

    浏览

如题,我第一次用Visual studio写代码,有些地方摸得不是很清楚。 在使用ODBC连接MySQL数据库的时候执行SQLPrepare的时候程序就在这里出现运行时错误:odbc32.dll处发生错误卡在这里,上网搜索也没搜出个所以然来,, 请问大佬能帮忙解答一下这是什么原因吗 源代码如下 #include<windows.h> #include<sql.h> #include<stdio.h> #include<sqlext.h> #include<sqltypes.h> #include<string.h> #include <time.h> #define ll long long #define db double #define fl float #pragma warning(disable:4996) #define LOGIN_TIMEOUT 30 #define MAXBUFLEN 255 using namespace std; RETCODE ret; HENV env = NULL; HDBC conn = NULL; HSTMT hstmt = NULL; void work() { int choice = 0;//存放用户选项 ret=SQLAllocEnv(&env); //分配连接句柄 ret=SQLAllocConnect(env, &conn); ret=SQLConnect(conn, (SQLCHAR*)"liba", SQL_NTS, (SQLCHAR*)"root", SQL_NTS, (SQLCHAR*)"qyp5225884", SQL_NTS); HSTMT temp; SQLRETURN err; SQLINTEGER Fin = SQL_NTS, lent; err = SQLAllocConnect(conn, &temp); int cnt = 0; err = SQLPrepare(temp, (SQLCHAR*)"SELECT COUNT(*) FROM book WHERE bno = \"0000000001\";", SQL_NTS); SQLExecute(temp); exit(0); } int main() { work(); return 0; }  

  • 1

    回答

  • 14

    浏览

标题没法放图 可能描述的不清楚 重新来描述下:   主键id 为1,2,3,4,5 使用了AUTO_INCREMRNT 我把主键id = 2的记录删除了   然后接下来插入一个记录 这时候 id被自动归为 6 了  然后再插入 则为 7 我希望 能在 第一次插入时 id为2  然后为6    请问大佬们有什么方便的办法吗...!!

回答 heluo____
采纳率66.7%
昨天
  • 6

    回答

  • 29

    浏览

Exception in thread "main" com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure Last packet sent to the server was 1158 ms ago.     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)     at java.lang.reflect.Constructor.newInstance(Constructor.java:423)     at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)     at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)     at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2103)     at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:718)     at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)     at java.lang.reflect.Constructor.newInstance(Constructor.java:423)     at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)     at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)     at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)     at java.sql.DriverManager.getConnection(DriverManager.java:664)     at java.sql.DriverManager.getConnection(DriverManager.java:247)     at com.kuang.lesson01.JdbcFristDemo.main(JdbcFristDemo.java:16) Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure Last packet sent to the server was 1158 ms ago.     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)     at java.lang.reflect.Constructor.newInstance(Constructor.java:423)     at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)     at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)     at com.mysql.jdbc.ExportControlled.transformSocketToSSLSocket(ExportControlled.java:104)     at com.mysql.jdbc.MysqlIO.negotiateSSLConnection(MysqlIO.java:4472)     at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1319)     at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2031)     ... 12 more Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target     at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)     at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1946)     at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:316)     at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:310)     at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1640)     at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:223)     at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1037)     at sun.security.ssl.Handshaker.process_record(Handshaker.java:965)     at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1064)     at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)     at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395)     at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379)     at com.mysql.jdbc.ExportControlled.transformSocketToSSLSocket(ExportControlled.java:89)     ... 15 more Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target     at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:450)     at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:317)     at sun.security.validator.Validator.validate(Validator.java:262)     at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:330)     at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:227)     at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132)     at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1622)     ... 23 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target     at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)     at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)     at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)     at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:445)     ... 29 more  

  • 8

    回答

  • 51

    浏览

我按照书本的代码,一个一个对着敲的,但是最后结果和书上的不一样 书上records:9

  • 8

    回答

  • 35

    浏览

正常启动后,空白的时候,点击登陆和注册会给提示。但是输入完相关信息后 再次点击就没有反应了。请问这是什么情况?怎么解决

  • 4

    回答

  • 30

    浏览

由于,人大金仓数据库kingbase不兼容MySQL数据库的date_add()函数,需要自定义一个,求大神解决!!!!  

  • 3

    回答

  • 41

    浏览

这个sql语句在别的地方是没有异常的,可是在这里提示语句错误: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1    

  • 4

    回答

  • 13

    浏览

我当前有两个云数据库的表单,我想先获取第一个表单里的”学号“”,然后作为条件用来查询第二个表单里学号是获取到的学号的数据有哪些,请问怎么实现? 我想的方法是这样: getData (){ var _this = this; const db2 = wx.cloud.database({ env: 'envenv' }) db2.collection("student").get({ success:res=>{ console.log(res) this.setData({ numb:res .data .Array .xuehao }) } }) },//data里定义了numb:10  然后 db.orderBy('time','desc').where({ xuehao:"18888888" }).get({ success(res) { console.log("全部内容:",res) that.setData({ list: res.data, }) } }) 可是没有效果,而且打印不出student的表单,也打印不出定义的numb。

  • 5

    回答

  • 49

    浏览

现在有一个表   暂时有80多个字段  数据量比较大 一天几亿条数据  1、不是每一个字段都能够用得上  不同的设备上传上来的数据不同(使用通用表会有冗余) 2、数据要进行计算 不能以以文本的方式存储,计算的时候会大量消耗cpu 内存等  (非实时计算,可离线) 3、后期还会继续增加字段 4、分布式应用场景 请问 如何选择数据库、表设计,  以及实体类的设计

  • 3

    回答

  • 19

    浏览

查询xsb中其实于2000年到2002年的所有人的姓名,性别,性别的值显示为男1时,女0

  • 3

    回答

  • 35

    浏览

愿意付费解决我问题。微信注销了电脑备份的BAK_0_MEDIA如何读取。现在微信无法登入,可是之前备份在电脑里的微信记录还在。手机也翻新了。求大神帮忙解决,给点技术费谢谢

  • 1

    回答

  • 9

    浏览

  • 2

    回答

  • 38

    浏览

已经在数据库中有商品每一条的交易信息,现在需要统计每个月商品的成交量,并在VB上显示成交量前十的商品信息,可以写一下代码嘛