摘要: with t as ( select '-' as col1 --isnumeric('-')这里会判断为数字,所以不能用 union all select '1' as col1 union all select '2' as col1 union all select '3.4' as col1 阅读全文
posted @ 2020-04-14 22:00 丶愤怒的蘑菇 阅读(345) 评论(0) 推荐(0) 编辑
摘要: --行转列小实例 --创建测试表 if object_id(N'test', N'U') is not null drop table test go with PivotTable as ( select 'xxx' as czy, '点赞' as czlx, 2 as num union all 阅读全文
posted @ 2020-04-14 21:50 丶愤怒的蘑菇 阅读(470) 评论(0) 推荐(0) 编辑