Home  >  Article  >  Database  >  行转列:SQL SERVER PIVOT与用法解释

行转列:SQL SERVER PIVOT与用法解释

WBOY
WBOYOriginal
2016-06-07 17:37:201101browse

在数据库操作中,有些时候我们遇到需要实现行转列的需求,例如一下的表为某店铺的一周收入情况表: WEEK_INCOME(WEEK VARCHAR(10) ,INCOME DECIMAL )

在数据库操作中,有些时候我们遇到需要实现“行转列”的需求,,例如一下的表为某店铺的一周收入情况表:

WEEK_INCOME(WEEK VARCHAR(10),INCOME DECIMAL)

Statement:
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