+ CASE WHEN LEN(MONTH(shenling)) = 1 THEN ''''0'''' + CONVERT(varchar(2),
month(shenling)) ELSE CONVERT(varchar(2), month(shenling))
END + ''''-'''' + CASE WHEN LEN(day(shenling)) = 1 THEN ''''0'''' + CONVERT(char(2),
day(shenling)) ELSE CONVERT(varchar(2), day(shenling)) END
WHERE (zhiyezheng = ''''139770070153'''')
七、 分区视图 分区视图是提高查询性能的一个很好的办法
--看下面的示例

--示例表
create table tempdb.dbo.t_10(
id int primary key check(id between 1 and 10),name varchar(10))

create table pubs.dbo.t_20(
id int primary key check(id between 11 and 20),name varchar(10))
 << 上一页 [11] [12] [13] [14] [15] [16] [17] [18] [19] 下一页 |