1.select sum(CASE WHEN A.[STATUS]=0 THEN 1 ELSE
0 end) as a1,sum(CASE A.[STATUS] WHEN 1 THEN 1 ELSE 0 end) as a2,sum(CASE
A.[STATUS] WHEN 2 THEN 1 ELS...
分类:
数据库 时间:
2014-06-04 21:10:46
阅读次数:
513
做法1: List list = new List(); Random rand = new
Random(); while (list.Count =1,=0,<100 之间的随机数m、n,颠倒arr[m]和arr[n]的数。 int[] arr
= new int[100]; //把100个数顺...
分类:
其他好文 时间:
2014-05-30 04:27:12
阅读次数:
208
本文希望通过简单的总结,把常用的查询方法予以总结,希望能够明确在心主要涵盖:模糊查询、排序、分组、集合函数、TOP、Case包括:Between、In、Like、And、Or、Order
by包括:Group by、Distinct、MAX\MIN、Avg、Count、Sum、Having、Top、...
分类:
数据库 时间:
2014-05-29 23:13:46
阅读次数:
456
sql server 全部库:declare @i int,@id int,@dbname
varchar(255),@sql varchar(255) set @i = 6 set @id=(select count(*) from
master..sysdatabases)drop ...
分类:
数据库 时间:
2014-05-29 22:15:06
阅读次数:
310
http://blog.chinaunix.net/uid-23577393-id-1751983.htmlTo
count how often any pattern occurs in the current buffer use the
substitutecommand and add th...
分类:
其他好文 时间:
2014-05-29 17:37:03
阅读次数:
217
You are given a string,S, and a list of
words,L, that are all of the same length. Find all starting indices of
substring(s) in S that is a concatenati...
分类:
其他好文 时间:
2014-05-29 09:09:35
阅读次数:
222
本篇文章介绍下redis排序命令.redis支持对list,set和sorted
set元素的排序。排序命令是sort 完整的命令格式如下:SORT key [BY pattern] [LIMIT start count] [GET
pattern] [ASC|DESC] [ALPHA] [STOR...
分类:
其他好文 时间:
2014-05-29 09:02:28
阅读次数:
318
/*题目:计算1~100中所有3的倍数的个数*/#includeintmain(){//记录3的倍数的个数intcount=0;//记录当前检查的数值intnumber=0;while(number<100){number++;//说明number是3的倍数if(number%3==0){count...
分类:
其他好文 时间:
2014-05-28 18:55:27
阅读次数:
196
BsCapters::model()->findAllBySql("select
count(*) as bookids from bs_capters where bookid = ".$bookid." and urlid =
".$urlid)count(*) as xxx这个xxx必须是表里...
分类:
其他好文 时间:
2014-05-28 11:32:16
阅读次数:
275
–-表现最差的前10名使用查询SELECT TOP 10 ProcedureName =
t.text, ExecutionCount = s.execution_count, AvgExecutionTime = isnull (
s.total_elapsed_time / s.executio...
分类:
数据库 时间:
2014-05-28 11:25:22
阅读次数:
449