码迷,mamicode.com
首页 >  
搜索关键字:where    ( 20257个结果
数据库操作符
in操作符,在可选范围内查找数据:1 USE test;2 -- 可以选取指定值,在...中3 SELECT * FROM city WHERE `Name` in ('Kabul','Herat')BETWEEN操作符:1 USE test;2 SELECT * FROM city WHERE I...
分类:数据库   时间:2015-08-13 21:44:37    阅读次数:165
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). Fi...
分类:其他好文   时间:2015-08-13 18:00:02    阅读次数:103
Yii2 搜索
where(['user_id'=>\Yii::$app->user->id])->asArray()->all(),'id','name_zh'), ['class'=>'form-control input-sm','prompt' => '请选择品牌'])?>'form-control inp...
分类:其他好文   时间:2015-08-13 15:41:10    阅读次数:129
MySQL之——10个select语句的简单用法
本篇文章主要讲述的是MySQL SELECT句法的简单分析,我们大家都知道MySQL数据库是我们大家经常使用的数据库,其相关的应用也是备受关注的,那么以下的文章主要是对MySQL SELECT句法的简单分析。 1、select语句可以用回车分隔 $sql="select * from article where id=1" 和 $sql="select * from article where...
分类:数据库   时间:2015-08-13 14:34:21    阅读次数:182
find_in_set
SELECT * FROM tablename where field1=2 and find_in_set(70,field2) ORDER BY `id` DESCfield2 里某条记录为 70,71,72,73会被找到,保存的值结构为逗号分隔
分类:其他好文   时间:2015-08-13 14:09:38    阅读次数:79
[LeetCode] 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-08-13 14:06:24    阅读次数:95
explain mysql性能优化
1 使用explain语句去查看分析结果,如 explain select * from test1 where id=1;会出现:id selecttypetable type possible_keys keykey_len ref rows extra各列其中,type=const表示通过索引...
分类:数据库   时间:2015-08-13 14:01:19    阅读次数:121
SQL中Group By的使用
1、概述2、原始表3、简单Group By4、Group By 和 Order By5、Group By中Select指定的字段限制6、Group By All7、Group By与聚合函数8、Having与Where的区别9、Compute 和 Compute By1、概述“Group By”从字...
分类:数据库   时间:2015-08-13 13:47:59    阅读次数:156
mysql substring_index
select * from tablename where substring_index(field1,'_',-1)=‘abc'#表中field1的值结构为123_abc
分类:数据库   时间:2015-08-13 13:44:58    阅读次数:143
ibatis 查询异常 Parameter index out of range
<select?id="qryUser"?resultClass="java.util.HashMap"??parameterClass="java.util.HashMap"?> SELECT?userId??FROM?sys_user?WHERE?1=1 <isNotEmpty?property="userId"> AND?userId?=?"...
分类:其他好文   时间:2015-08-13 12:33:54    阅读次数:212
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!