码迷,mamicode.com
首页 >  
搜索关键字:where    ( 20257个结果
【leetcode】Gray Code
The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the total number...
分类:其他好文   时间:2015-03-06 15:34:13    阅读次数:153
ORACLE分页SQL语句
http://www.cnblogs.com/hxw/archive/2005/09/11/234619.html1.根据ROWID来分select * from t_xiaoxi where rowid in(select rid from (select rownum rn,rid from(s...
分类:数据库   时间:2015-03-06 14:05:19    阅读次数:162
oracle集锦
1.decode的用法:(select max(DECODE(logicSn,null,physicalid+1,logicSn+1)) from m_logic_channel where physicalid=#{physicalId}),2.nvl的用法:(select nvl(max(t.l...
分类:数据库   时间:2015-03-06 13:59:50    阅读次数:154
leetcode Rotate List
1. 题目描述Given a list, rotate the list to the right by k places, where k is non-negative.For example: Given 1->2->3->4->5->NULL and k = 2, return 4->5->1->2->3->NULL.2.解决方案1class Solution { public: Li...
分类:其他好文   时间:2015-03-06 10:03:23    阅读次数:86
访问Access日期字段
在使用sql访问Access日期字段,应在变量前后加#,例子:s:=Format(select xueshID,name,times,qukbz,skdate,banji from dianmjili where skdate =%s,[#+formatdatetime(yyyy/m/d,DateT...
分类:数据库   时间:2015-03-06 09:36:29    阅读次数:177
Combination Sum II
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each number in C may only be used once in the combinati...
分类:其他好文   时间:2015-03-06 01:06:30    阅读次数:126
sql中的case when语句
1.在where子句中: 1 CREATE TABLE `hello`.`sometbl` ( 2 3 `id` INT NOT NULL AUTO_INCREMENT , 4 5 `a` VARCHAR(45) NULL , 6 7 `b` VARCHAR(45) NULL ,...
分类:数据库   时间:2015-03-05 22:18:29    阅读次数:227
oracle常用查询语句
1:列出所有员工的姓名,部门名称,和工资select a1.ename,a1.sal,a2.dname from emp a1,dept a2 where a1.deptno = a2.deptno;2:列出所有部门的详细信息和部门人数select a2.deptno,a2.dname,a2.loc...
分类:数据库   时间:2015-03-05 22:15:04    阅读次数:217
oracle sql优化
第一掌 避免对列的操作任何对列的操作都可能导致全表扫描,这里所谓的操作包括数据库函数、计算表达式等等,查询时要尽可能将操作移至等式的右边,甚至去掉函数。例1:下列SQL条件语句中的列都建有恰当的索引,但30万行数据情况下执行速度却非常慢:select * from record where subs...
分类:数据库   时间:2015-03-05 22:10:37    阅读次数:307
Oracle学习记录 八 多表查询
1. 笛卡尔集 select * from emp, dept; 2. 等值连接 select?ename, job from emp, dept where emp.deptno=dept.deptno; 3. 非等值连接 select ename, grade from emp, salgrade where sal between losal and his...
分类:数据库   时间:2015-03-05 19:39:54    阅读次数:197
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!