1. order by 中关于null的处理
缺省处理:oracle在order by时认为null是最大值, 所以如果是asc升序则排在最后, desc降序则排在最前.
我们可以使用nulls first或者nulls last来控制null的位置
将null放在最前:select * from student order by name asc nulls first
将nul...
分类:
其他好文 时间:
2015-04-16 14:20:39
阅读次数:
101
Given an directed graph, a topological order of the graph nodes is defined as follow:For each directed edge A-->B in graph, A must before B in the ord...
分类:
其他好文 时间:
2015-04-16 13:48:58
阅读次数:
253
Binary Tree Level Order Traversal IITotal Accepted:37829Total Submissions:122499My SubmissionsQuestionSolutionGiven a binary tree, return thebottom-up...
分类:
其他好文 时间:
2015-04-16 12:23:02
阅读次数:
176
Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree{3,9,2...
分类:
其他好文 时间:
2015-04-16 12:08:03
阅读次数:
148
Given a string ‘str’ of digits and an integer ‘n’, build the lowest possible number by removing ‘n’ digits from the string and not changing the order ...
分类:
其他好文 时间:
2015-04-16 11:49:38
阅读次数:
179
题目链接:Binary Tree Zigzag Level
Order Traversal
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and a...
分类:
其他好文 时间:
2015-04-16 10:24:56
阅读次数:
116
闲来无事,学习Unity5练练手, 一个贪吃蛇小Demo简单的2D场景, 对象都是Sprite,需要设置前后的显示层级,从蛇头到蛇尾的Order in Layer 的值是1000 递减1,所以显示的效果是具有鳞片的层叠。蛇的每一节都有一个脚本 SnakePart.cs 记录这节的位置、方向包括计算值。蛇没吃一个苹果,就会实例化产生一节, 其中新产生的这节上有一个新脚本 NewSnakePart.c...
分类:
编程语言 时间:
2015-04-16 10:21:49
阅读次数:
203
(1)数据记录筛选:
sql= "select * from 数据表 where 字段名 = 字段值 order by 字段名 [desc]"
sql = "select * from 数据表 where 字段名 like '%字段值%' order by 字段名 [desc]"
sql = "select top10 * from 数据表 where 字段名...
分类:
数据库 时间:
2015-04-16 09:09:45
阅读次数:
182
题目链接:Binary Tree Level Order Traversal
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).
For example:
Given binary tree {3,9,20,#...
分类:
其他好文 时间:
2015-04-16 09:03:12
阅读次数:
160
http://stackoverflow.com/questions/3959692/rownum-in-postgresqlSELECT row_number() OVER (ORDER BY col1) AS i, e.col1, e.col2, ... FROM...
分类:
数据库 时间:
2015-04-16 07:57:38
阅读次数:
129