http://blog.csdn.net/qianling3439/archive/2007/12/07/1922165.aspx http://topic.csdn.net/t/20060729/17/4914018.html http://www.memoon.cn/news_view.asp?id=7429
--测试数据 if exists(select [id] from sysobjects where name='student') drop table student go create table student ( sname varchar(20) not null, sclass varchar(20) not null ) go alter table student add constraint pk_student primary key(sname,sclass); go if exists(select [id] from s ...
like使用了前%,这种会造成全表scan,即使你在where条件后设置了索引列的查询条件。所以建议在like时只使用后%。 ---------------------- 如果想 like '1234%' 则直接用index, like '%1234' 则用反向索引, like '%123%' 则没什么办法,只能是全表扫描。 ---------------------- 由于数据库索引不是为全文索引设计的,因此,使用like "%keyword%"时,数据库索引是不起作用的,在使用like查询时,搜索过程又变成类似于一页页翻书的遍历过程了,所以对于含有模糊查询的数据库服务来说,LIKE对性能的 ...
truncate table tab1 create table tab1 ( a int primary key not null identity(1,1), b varchar(10), c varchar(10), d float, e float, f float ) go insert into tab1(b,c,d,e,f) values('a','aa',1,2,3); insert into tab1(b,c,d,e,f) values('b','bb',2,3,4); insert into tab1(b,c,d ...
/** * 根据输入日期值输出所在季度起始日期 */ public class Test { public static void main(String[] args) { // TODO 自动生成方法存根 String[] a = getQuarterDate("20070818"); for (String s : a) { System.out.println(s); } } public static String[] getQuarterDate(String tradeDate) { String[] arr ...
javaboy2006
搜索本博客
我的相册
A84ce64e-d101-3dad-9e62-8780e1c003ea-thumb
CommandPattern2
共 11 张
最近加入圈子
存档
最新评论