zoukankan
html css js c++ java
分列顯示
use
test
go
--
生成測試臨時表#
if
not
object_id
(
'
Tempdb..#
'
)
is
null
drop
table
#
select
top
35
[
Name
]
=
cast
(
[
Name
]
as
nvarchar
(
50
))
into
#
from
syscolumns
where
Name
>
''
--
---35行分6列顯示
select
*
from
(
select
Name,
[
Ntile
]
,
[
Row
]
=
row_number()
over
(partition
by
[
Ntile
]
order
by
[
Ntile
]
)
from
(
select
*
,
[
Ntile
]
=
Ntile(
6
)
over
(
order
by
Name)
from
#)T
)Tmp
pivot
(
max
(Name)
for
[
Ntile
]
in
(
[
1
]
,
[
2
]
,
[
3
]
,
[
4
]
,
[
5
]
,
[
6
]
)
)Tmp2
/**/
/*
Row 1 2 3 4 5 6
----------- -------------------- --------------- ------------------ ---------- --------------- ---------------
1 base_schema_ver id refdate sysstat xtype impid
2 cache indexdel replinfo type dpages indid
3 category info schema_ver uid first keycnt
4 crdate instrig seltrig updtrig FirstIAM keys
5 deltrig name stats_schema_ver userstat groupid lockflags
6 ftcatid parent_obj status version id NULL
(6 個資料列受到影響)
*/
查看全文
相关阅读:
空心杯 电机
scikit learn 安装
python fromkeys() 创建字典
python 清空列表
mac最常用快捷键
php while循环
php 获取某个日期n天之后的日期
php 添加时间戳
php 格式化时间
php 数值数组遍历
原文地址:https://www.cnblogs.com/Roy_88/p/5463107.html
最新文章
今日十问(二)
android之AlarmManager 全局定时器
今日十问
一个响应式框架——agera
常用UI布局
Android好用且常用的插件及工具
Android三种播放视频的方式
在android中进行视频的分割
c++ 插入容器元素(insert)
c++ 交换两个容器(swap)
热门文章
ubuntu14.04 设置开机自启动脚本
ros 杀掉所有节点
ssh 指定ssh端口号
Message: dlopen failed for module ‘x’: file not found
安装 bochs
安装 bochs-x
Windows 搭建 Linux kernal0.11 环境
python 获取进程执行的结果
shell 使用ping测试网络
飞行控制器——传感器
Copyright © 2011-2022 走看看