随笔分类 - mysql
摘要:mysql> show variables like '%character%';+--------------------------+----------------------------+| Variable_name | Value ...
阅读全文
摘要:public TJb checkjbByschool(long id)throws ClassNotFoundException,SQLException { Class.forName("com.mysql.jdbc.Driver"); Connection conne...
阅读全文
摘要:按时间倒序出所有的数据mysql> select id,id_no from torder where user = 8 order by createtime desc ;+----+------------------+| id | id_no |+----+------...
阅读全文
摘要:首先,将按条件查询并排序的结果查询出来。 1 mysql> select accepttime,user,job from tuser_job where user =8 order by accepttime desc; 2 +---------------------+------+-----...
阅读全文
摘要:1 select DATE_FORMAT(createtime,'%Y-%m'),count(*) from test where user =8 group by DATE_FORMAT(createtime,'%Y-%m');//按月统计数据2 select DATE_FORMAT(create...
阅读全文
摘要:查了一下发现应用程序和mysql数据库建立连接,如果超过8小时应用程序不去访问数据库,数据库就断掉连接 。这时再次访问就会抛出异常。关于mysql自动断开的问题研究结果如下,1、c3p0、HikariCP等连接池配置。2、在自己的程序中插入定时访问数据库的方法,比如使用Timer,Quartz或者s...
阅读全文

浙公网安备 33010602011771号