镇场诗:---大梦谁觉,水月中建博客.百千磨难,才知世事无常.---今持佛语,技术无量愿学.愿尽所学,铸一良心博客.------------------------------------------ 1 code >>> print("hello world\n" * 8) 2 show hello world hello world hello world hello world hello world hello world hello world hello
1. 第一个问题:时间少了8小时 Log4j 输出的日志中,时间比系统时间少了8小时,但是 eclipse 控制台输出的日志的时间却是对的. log4j配置如下: #all logger output level is 'ERROR' and output position is stdout #so only write our project's DEBUG log and ERROR log of the others log4j.rootLogger=ERROR, stdout, R #
1.存在两条完全相同的纪录 这是最简单的一种情况,用关键字distinct就可以去掉 select distinct * from table(表名) where (条件) 2.存在部分字段相同的纪录(有主键id即唯一键) 如果是这种情况的话用distinct是过滤不了的,这就要用到主键id的唯一性特点及group by分组 select * from table where id in (select min(id) from table group by [去除重复的字段名列表,....])