1.查看SQL语句IO消耗set statistics io on select * from dbo.jx_order where order_time>'2011-04-12 12:49:57.580'set statistics io off2.查看SQL语句时间消耗set statisti....
分类:
数据库 时间:
2014-07-09 21:49:17
阅读次数:
314
今天在review项目代码的时候看到这样一个问题,有一张号码表,每次需要从这样表中随机取6个空闲的号码,也就是每次取出来的6个号码应该都会有所不同。然后我就看到了这样的SQL select t.* from tel_number_tbl t where t.status = '空闲' and t.a...
分类:
数据库 时间:
2014-07-09 00:30:21
阅读次数:
220
Determine if a Sudoku is valid, according to:Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with ...
分类:
其他好文 时间:
2014-07-08 23:12:45
阅读次数:
298
oracle下session的查询与删除
1、查询当前session
SQL>
select username,sid,serial# from v$session where username is not null;
USERNAME SID SERIAL#
--------------------------...
分类:
数据库 时间:
2014-07-08 18:06:02
阅读次数:
291
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). Fin...
分类:
其他好文 时间:
2014-07-08 14:21:56
阅读次数:
190
Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints of ...
分类:
其他好文 时间:
2014-07-06 17:44:30
阅读次数:
181
DECLARE @TableName VARCHAR(119)DECLARE @TableID INTDECLARE @ColName VARCHAR(111)DECLARE Table_Cursor CURSOR FOR SELECT [name],id FROM sysobjects WHERE...
分类:
数据库 时间:
2014-07-06 15:11:47
阅读次数:
280
---问题select owner,index_name,DEGREE from DBA_INDEXES where DEGREE>1 *ERROR at line 1:ORA-01722: invalid number--1 获取运行跟踪信息SQ...
分类:
其他好文 时间:
2014-07-06 13:41:04
阅读次数:
278
Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adjace...
分类:
其他好文 时间:
2014-07-05 21:30:45
阅读次数:
175
where 和 having 的区别: WHERE 子句不能包含聚集函数; 因为试图用聚集函数判断那些行输入给聚集运算是没有意义的。相反,HAVING 子句总是包含聚集函数 having一般跟在group by之后,执行记录组选择的一部分来工作的。 where则是执行所有数据来工作的。再者havi....
分类:
其他好文 时间:
2014-07-05 20:57:59
阅读次数:
239