码迷,mamicode.com
首页 >  
搜索关键字:where    ( 20257个结果)
oracle解决多表关联分组查询问题
做了一个功能需要分组查询,同时查询A表分组查询的ID需要关联B表的数据,本来想两个表关联查询,但是报group by 语法不正确。所以做了以下修改。select count(*),cindexid,(select vindexcode from comindex where pk_index =ci...
分类:数据库   时间:2014-07-09 20:04:57    阅读次数:224
MySQL的left join中on与where的区别
关于 “A LEFT JOIN B ON 条件表达式” 的一点提醒ON条件(“A LEFT JOIN B ON 条件表达式”中的ON)用来决定如何从B表中检索数据行,即使on中包含有A表中的列的限制条件,也不会过滤A的任何数据(A的数据只会通过where过滤)。如果B表中没有任何一行数据匹配ON的条...
分类:数据库   时间:2014-07-09 16:57:08    阅读次数:358
CTCI 2.5
You have two numbers represented by a linked list, where each node contains a single digit. The digits are stored in reverse order, such that the Ts d...
分类:其他好文   时间:2014-07-09 15:35:19    阅读次数:176
oracle 知识
1.查询索引数量select table_name, count(*) cnt from user_indexes where index_type='NORMAL' group by table_namehaving count(*) >= 1order by cnt desc ;2.查询外键未....
分类:数据库   时间:2014-07-08 22:40:18    阅读次数:308
Cracking the Coding Interview Q1.6
Given an image represented by an NxN matrix, where each pixel in the image is 4 bytes, write a method to rotate the image by 90 degrees. Can you do th...
分类:其他好文   时间:2014-07-08 22:06:25    阅读次数:222
codeigniter 操作mysql的PHP代码--更新
支持标前缀 1)查询不等于且有等于 $this->db->get_where('host',array('host'=>'ddd','id !='=>0))->row(); 2)2表相交 return $this->db ->select('f.*,count(s.id) as subtotal') ->f...
分类:数据库   时间:2014-07-08 20:05:19    阅读次数:241
基于json数据格式实现的简单数据库——jsonDB
jsonDB是js的一个类库,是基于json数据格式构建的数据模型实现对json数据增删改查。jsonDB的构建源自于HTML5本地存储的一个应用需求,可以通过sql对json数据进行增删改查,同时该类库提供强大的where检索条件,数据排序, limit查询条件限制等数据库基本功能。通过jsonDB可以轻松维护一个库/表或多个库/表,而无需额外实现json的数据的维护等,在该类库完善以后为简化sql操作,基于jsonDB核心模块扩展了连贯操作模型,简化对jsonDB的操作以及sql语句出错的概率。...
分类:数据库   时间:2014-07-08 15:18:39    阅读次数:261
jsonDB使用手册
jsonDB是js的一个类库,是基于json数据格式构建的数据模型实现对json数据增删改查。jsonDB的构建源自于HTML5本地存储的一个应用需求,可以通过sql对json数据进行增删改查,同时该类库提供强大的where检索条件,数据排序,limit查询条件限制等数据库基本功能。通过jsonDB可以轻松维护一个库/表或多个库/表,而无需额外实现json的数据的维护等,在该类库完善以后为简化sql操作,基于jsonDB核心模块扩展了连贯操作模型,简化对jsonDB的操作以及sql语句出错的概率。...
分类:数据库   时间:2014-07-08 14:46:35    阅读次数:213
Cracking the Coding Interview Q2.5
You have two numbers represented by a linked list, where each node contains a single digit. The digits are stored in reverse order, such that the 1’s ...
分类:其他好文   时间:2014-07-08 13:34:40    阅读次数:195
mysql生成随机时间
mysql> update test set create_time=concat('2013-10-01 ', floor(10+rand()*10),':',floor(10+rand()*49),':',floor(10+rand()*49)) where create_time='0000-00-00 00:00:00'; Query OK, 1 row affected Rows ma...
分类:数据库   时间:2014-07-08 13:01:03    阅读次数:227
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!