找出数据库的serial#,以备杀死:select t2.username,t2.sid,t2.serial#,t2.logon_time from v$locked_object t1,v$session t2 where t1.session_id=t2.sid order by t2.logo...
分类:
数据库 时间:
2015-06-09 19:38:18
阅读次数:
115
s = SELECT t.* FROM tw = WHEREb = BETWEEN ANDl = LIKE '%%'o = ORDER BYinsw = IN (SELECT a FROM a WHERE a )sw = SELECT t.* FROM t WHERE tsc* = SELE...
分类:
数据库 时间:
2015-06-09 19:30:34
阅读次数:
257
例子:
SET?@ranking=0;
select?*,@ranking:=@ranking+1?AS?`ranking`?from?table?ORDER?BY?`members`?DESC; 1. 先给用户变量 @ranking 赋值,mysql中用户变量以@开头,不用事先申明; 2. 然后按照某...
分类:
数据库 时间:
2015-06-09 17:55:01
阅读次数:
165
【题目链接】click here~~
【题目大意】:
You are given string s. Your task is to determine if the given string s contains two non-overlapping substrings “AB” and “BA” (the substrings can go in any order).
Input...
分类:
其他好文 时间:
2015-06-09 17:24:38
阅读次数:
105
You are given string s. Your task is to determine if the given string s contains
two non-overlapping substrings "AB" and "BA" (the substrings
can go in any order).
Input
The only line of...
分类:
其他好文 时间:
2015-06-09 17:21:51
阅读次数:
184
此方法是我见过最聪明的写法,不过不知道有没有隐含的bug:参考地址select id, col from tableName order by length(col) asc, col asc这种方法只针对文本统一的情况,如:abc1,abc2,abc3,abc10,abc11如果文本长度不统一如:...
分类:
数据库 时间:
2015-06-09 15:35:53
阅读次数:
168
Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn’t matter what you leave beyond the new length.思路:遍历数组,如果...
分类:
其他好文 时间:
2015-06-09 11:59:43
阅读次数:
115
---查询数据库所有表名
select id,name from sysobjects where xtype='u' order by name
---查询表的所有字段属性
select * from syscolumns where id=object_id(N'FMS_PayApply')
---查询表字段名,类型,长度,默认值,是否允许为空
select col...
分类:
其他好文 时间:
2015-06-09 09:51:03
阅读次数:
136
题目:Given an integern, generate a square matrix filled with elements from 1 ton2in spiral order.For example,Givenn=3,You should return the following ma...
分类:
其他好文 时间:
2015-06-09 08:30:13
阅读次数:
106
题目:Given a matrix ofmxnelements (mrows,ncolumns), return all elements of the matrix in spiral order.For example,Given the following matrix:[ [ 1, 2, 3...
分类:
其他好文 时间:
2015-06-09 08:27:01
阅读次数:
79