码迷,mamicode.com
首页 >  
搜索关键字:where    ( 20257个结果
Oralce中SQL删除重复数据只保留一条(转)
用SQL语句,删除掉重复项只保留一条在几千条记录里,存在着些相同的记录,如何能用SQL语句,删除掉重复的呢1、查找表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断 select * from people where peopleId in (select peopleId fr...
分类:数据库   时间:2015-06-16 12:31:07    阅读次数:149
Yii PHP sum SQL查询语句
例子:$sql = 'SELECT SUM(o.price) as `sum` FROM `order` o WHERE o.customer_id ='.$profile->id;$ret = Yii::$app->db->createCommand($sql)->qu...
分类:数据库   时间:2015-06-16 12:26:27    阅读次数:445
[LeetCode] #36 Valid Sudoku
Determine if a Sudoku is valid, according to:Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with ...
分类:其他好文   时间:2015-06-16 10:52:02    阅读次数:146
数据库连接数问题
http://www.chengxuyuans.com/oracle/90720.html select value from v$parameter where name = 'processes'; alter system set processes = 300 scope = spfi...
分类:数据库   时间:2015-06-16 10:49:40    阅读次数:192
[编程题]Shuffling Machine (洗牌程序)
Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid “inside jobs” where employees collaborate with gamblers...
分类:系统相关   时间:2015-06-16 09:26:09    阅读次数:160
leetcode——Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Fin...
分类:其他好文   时间:2015-06-16 09:23:26    阅读次数:138
thinkphp中M()函数怎么用
M()函数,用来实例化一个要查询的对象,传入表面作为参数。查询的时候可带where()条件,where里可带一个数组作为查询条件,field()函数作为需要查询的字段,目前我用到的查询只有,select() save() find() count()。例子:$user=M('admin')->whe...
分类:Web程序   时间:2015-06-16 01:18:01    阅读次数:449
MySQL如何利用索引优化ORDER BY排序语句
MySQL索引通常是被用于提高WHERE条件的数据行匹配或者执行联结操作时匹配其它表的数据行的搜索速度。MySQL也能利用索引来快速地执行ORDER BY和GROUP BY语句的排序和分组操作。通过索引优化来实现MySQL的ORDER BY语句优化:1、ORDER BY的索引优化。如果一个SQL语句...
分类:数据库   时间:2015-06-15 23:50:58    阅读次数:180
[LeetCode] #35 Search Insert Position
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or...
分类:其他好文   时间:2015-06-15 23:39:02    阅读次数:123
for update
对比区别: 1 select * from TTable1 for update 锁定表的所有行,只能读不能写 2 select * from TTable1 where pkid = 1 forupdate 只锁定pkid=1的行 3 select * from Table1 a join ...
分类:其他好文   时间:2015-06-15 20:30:08    阅读次数:104
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!