Firstly, we need to know what contents tables have!select Date,sum(todayConsume) from industry2_consume where 2_department in ('V1','V2','地管','武管','地新...
分类:
数据库 时间:
2015-06-18 16:58:50
阅读次数:
156
Rotate List
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.
解题思路:
这道题题意说得不...
分类:
其他好文 时间:
2015-06-18 15:23:28
阅读次数:
115
set head off set lin 150 set pages 0 set long 10000 select TEXT from user_source t where t.name = upper(‘get_car_status_new‘) order by TYPE, LINE; ======================= set pages 0 set longchunks...
分类:
数据库 时间:
2015-06-18 13:47:16
阅读次数:
169
Essential JavaScript FunctionsBy David Walsh onJune 2, 2015 I remember the early days of JavaScript where you needed a simple function for just about ...
分类:
编程语言 时间:
2015-06-18 13:21:10
阅读次数:
134
--查询select a.* from user_constraints a where a.CONSTRAINT_TYPE = 'R' and a.R_CONSTRAINT_NAME in (select b.CONSTRAINT_NAME from user_...
分类:
其他好文 时间:
2015-06-18 13:17:17
阅读次数:
108
SQL> select * from v$version where rownum=1;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Prod...
分类:
其他好文 时间:
2015-06-18 11:32:48
阅读次数:
161
今天突然翻到为客户端写分页数据的sql,发现其实逻辑不对。按照id降序当时这样写的:#翻上一页:select 字段 from 表 where id>lastId order by id desc limit pageSize#翻下一页:select 字段 from 表 where id9,如果只是降...
分类:
数据库 时间:
2015-06-18 11:22:32
阅读次数:
112
摘录自http://blog.sina.com.cn/s/blog_43ad83920100nkfp.html 1 IF EXISTS ( SELECT * 2 FROM SYS.OBJECTS 3 WHERE NAME LIKE '...
分类:
数据库 时间:
2015-06-18 11:12:31
阅读次数:
163
1000-digit Fibonacci number
Problem 25
The Fibonacci sequence is defined by the recurrence relation:
Fn = Fn?1 + Fn?2, where F1 = 1 and F2 = 1.
Hence the first 12 terms will be:
F1 = 1
F...
分类:
编程语言 时间:
2015-06-18 09:52:36
阅读次数:
175
首先我们来看一个带排序的查询,点击工具栏的显示包含实际的执行计划。1 SELECT * FROM AdventureWorks2008R2.Person.Person WHERE FirstName LIKE 'w%' ORDER BY 1从执行计划里可以看出,SELECT运算符包含了内存授予(Me...
分类:
其他好文 时间:
2015-06-18 09:26:31
阅读次数:
174