随笔分类 -  数据库操作

摘要:在处理使用Mysql时,数据表采用utf8字符集,使用中发现中文不能直接按照拼音排序如果数据表tbl的某字段name的字符编码是latin1_swedish_ciselect * from `tbl` order by birary(name) asc ;如果数据表tbl的某字段name的字符编码是... 阅读全文
posted @ 2015-07-29 11:06 Amy_Li 阅读(2093) 评论(0) 推荐(1)
摘要:注意:编码前先导入poi相关jar包 1 /** 2 * 读excel 到list 3 * 4 * @param file excel file 5 * @param fields 字段数组 6 * @return 7... 阅读全文
posted @ 2015-07-15 09:22 Amy_Li 阅读(2586) 评论(0) 推荐(0)
摘要:实现的功能:Java实现Excel导入数据库,如果存在就更新数据库中的数据导入到Excel注意:非poi,不支持ninux系统,另一篇随笔记录了poi类型的,支持ninux系统1、添加jxl.jarmysql-connector-java.1.7-bin.jar包到项目的lib目录下­2、Excel... 阅读全文
posted @ 2015-07-13 17:05 Amy_Li 阅读(10119) 评论(0) 推荐(1)
摘要:ELECT t0.accusation_des, t0.submit_time, t0.result, t0.handle_time, t1.content, t4.nick_name,t5.content,t6.ask_title ,t7.state_name,t8.... 阅读全文
posted @ 2015-07-13 16:47 Amy_Li 阅读(373) 评论(0) 推荐(0)
摘要:update 表名 set 字段名=replace(字段名,’要替换的内容’,’替换后的内容’)eg:修改scenario表中的picture字段中的ip地址。1 UPDATE scenario2 SET picture = REPLACE(picture, '10.10.4.43','10.10.... 阅读全文
posted @ 2015-05-26 11:13 Amy_Li 阅读(786) 评论(0) 推荐(0)