- 博客(5)
- 资源 (1)
- 收藏
- 关注
原创 SQL用例:convert(),while,Dateadd()
use [Test]delete [DateString]insert into [DateString] values('asdf',convert(datetime,'1990-12-19'),0)declare @i intset @i=1while
2011-10-10 14:51:32
205
原创 SQL PIVOT关键字例
select *from(select Col1,Col2,Value from Result) as t1Col1 | Col2| Valuea 5 1a 4 -1b 5 3b
2011-10-02 22:43:16
289
原创 SQL case关键字
Use testselect t2.col_1, sum(t2.col_a)as COL_A,sum(t2.col_b)as COL_B,sum(t2.col_c)as COL_Cfrom( select t.col_1, case t.name when 'a' t
2011-10-02 22:25:55
252
原创 SQL full join+自定义条件列
use testselect *from((select Col1,Col2 from Result where Col3='a')as T1(Col1,Col2_A)full join(select Col1,Col2 from Result where Col3=
2011-10-02 22:20:43
430
原创 SQL游标使用例
Use [test]declare my_cur cursor for select name,Value from [Result]declare @s nchar(10)declare @a floatdeclare @c floatopen my_cur
2011-10-02 22:09:48
204
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人