摘要:
冒泡排序: //降序 public static int[] bubbleSort(int[] array){ for(int i = 0; i = 0; j--){ int temp = array[j]; if... 阅读全文
posted @ 2015-05-16 19:42
秋楓
阅读(1327)
评论(0)
推荐(0)
摘要:
查找包含某个字符的行并保存在文件grep -rn 'test' ./*.sql >test.sql-r是递归查找-n是显示行号在当前目录下的.sql结尾的文件中查找包含 test 字符的行并保存在test.sql文件中。 阅读全文
posted @ 2015-05-16 11:32
秋楓
阅读(250)
评论(0)
推荐(0)
摘要:
SQL:删除重复数据,只保留一条用SQL语句,删除掉重复项只保留一条在几千条记录里,存在着些相同的记录,如何能用SQL语句,删除掉重复的呢1、查找表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断 select * from people where peopleId in (se... 阅读全文
posted @ 2015-05-16 09:52
秋楓
阅读(881)
评论(0)
推荐(0)
摘要:
两个或多个表关联,没写where条件,大量的笛卡尔值,严重时会导致数据库有问题。select * from a, b left join c on b.id = c.id left join d on c.id = d.id多表关联查询,where条件使用各种函数,导致索引无效。数据量如果打起来以后... 阅读全文
posted @ 2015-05-16 09:30
秋楓
阅读(222)
评论(0)
推荐(0)


浙公网安备 33010602011771号