Home > Database > Mysql Tutorial > T-SQL 行列互换

T-SQL 行列互换

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 17:43:52
Original
1267 people have browsed it

对于一个简单的表, 两行两列(行号暂且不算). 要对它进行行列互换, 怎么做? 先准备测试数据: CREATE TABLE TempSum(n INT ,gender VARCHAR ( 10 ),total INT ); INSERT INTO TempSum(n, gender, total) VALUES ( , , 45 ); TempSum; n gender total male 23 2

对于一个简单的表, 两行两列(行号暂且不算). 要对它进行行列互换, 怎么做?

先准备测试数据:

CREATE TABLE TempSum( n INT, gender VARCHAR(10), total INT ); INSERT INTO TempSum(n, gender, total) VALUES (, , 45); TempSum;
n gender total
male 23 2 female 45 ,虚拟主机,香港服务器,香港空间

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template