码迷,mamicode.com
首页 >  
搜索关键字:where    ( 20257个结果
MySql批量更新方法
准备数据表 user(用户)、dept(部门)1:更新符合单个条件的某个字段的一条数据 update user u set u.name = '测试' where u.id = ""2:in 更新多条数据 update user u set u.name = '测试' where u.id in.....
分类:数据库   时间:2015-09-28 14:29:43    阅读次数:169
[LeetCode] Find the Duplicate Number
Find the Duplicate NumberGiven an arraynumscontainingn+ 1 integers where each integer is between 1 andn(inclusive), prove that at least one duplicate ...
分类:其他好文   时间:2015-09-28 14:28:07    阅读次数:117
[LeetCode] Find the Duplicate Number 寻找重复数
Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate element must exist....
分类:其他好文   时间:2015-09-28 13:18:57    阅读次数:166
oracle索引的理解
1、当查询表时where条件中有多个索引时,优先使用主键索引,其它索引会失效。2、当查询的返回的数据占总量数据的百分比小于20%时,建索引才有效果3、不是主键的索引值可以为空,主键索引不能为空。4、容易引起oracle索引失效的原因很多:1)、在索引列上使用函数。如SUBSTR,DECODE,INS...
分类:数据库   时间:2015-09-28 13:08:51    阅读次数:168
SQL语句优化 (二) (53)
接上一部分(4)如果不是索引列的第一部分,如下例子:可见虽然在money上面建有复合索引,但是由于money不是索引的第一列,那么在查询中这个索引也不会被MySQL采用。mysql> explain select * from sales2 where moneys=1 \G************...
分类:数据库   时间:2015-09-28 13:07:09    阅读次数:210
Mysql新知识点150928
1.select distinct(DATE_FORMAT(updatetime,'%Y-%m')) as updatetime from barcode where pid!=0 order by updatetimedistinct()作用:重复的值中只选出一个date_format()作用:规...
分类:数据库   时间:2015-09-28 11:42:53    阅读次数:201
Yii2.0 对数据库 查询的简单操作
User::find()->all(); 此方法返回所有数据;User::findOne($id); 此方法返回 主键 id=1 的一条数据(举个例子); User::find()->where(['name' => '小伙儿'])->one(); 此方法返回 ['name' => ...
分类:数据库   时间:2015-09-28 11:18:26    阅读次数:272
PHP 邮箱操作的Action
".$start .""; // $mail = M('sysinfo'); // $where['parameter'] = 'mailPageNum'; // $mailListLength = $mail->wh...
分类:Web程序   时间:2015-09-27 21:28:45    阅读次数:352
这些~~~
SELECT * smokemommon WHERE yanming='长城(盛世5号)' AND yearID=17SELECT *,SUM(shuliang) FROM smokemommon WHERE yearID=17 GROUP BY yanming,leixing,yearID HAV...
分类:其他好文   时间:2015-09-27 20:12:24    阅读次数:131
[leetcode 36] valid sudoku
1 题目Determine if a Sudoku is valid, according to:Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled w...
分类:其他好文   时间:2015-09-27 20:05:02    阅读次数:175
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!