摘要:
declare @t table( c varchar(10));insert @tselect *from (select 'A' as c union allselect 'B' union allselect 'B' union allselect null union allselect null) t;select count(*) from @t;select count(c) fro... 阅读全文
posted @ 2009-03-04 11:23
Good life
阅读(216)评论(0)推荐(0)
编辑
摘要:
-- sql serverselect idfrom(select '1' as id union allselect '2' union allselect '3' union allselect '4' union allselect '5' ) torder by case when charindex(id, '3, 2, 4, 1') = 0 then 1000000 else char... 阅读全文
posted @ 2008-12-04 12:39
Good life
阅读(211)评论(0)推荐(0)
编辑
摘要:
-------- begining of the structure of test --------/*userId userName1 John12 John23 John34 John45 John5*/ ---------------- part 1 ----------------declare cursor v_cursor is selec... 阅读全文
posted @ 2008-08-28 11:47
Good life
阅读(742)评论(0)推荐(0)
编辑