Home > Backend Development > PHP Tutorial > MySQL (C API) VC example and code download (1) (2)_PHP tutorial

MySQL (C API) VC example and code download (1) (2)_PHP tutorial

WBOY
Release: 2016-07-13 17:03:12
Original
951 people have browsed it


10. SQL statement skills

1. A SQL statement problem: row and column conversion

select * from v_temp

The above view results are as follows:

user_name role_name

-------------------------

System Administrator Administrator

feng Administrator

feng General User

test General User

I want the result to be like this:

user_name role_name

--------------------------

System Administrator Administrator

feng administrator, general user

test general user

===================

create table a_test(name varchar(20),role2 varchar(20))

insert into a_test values('李','management

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/630992.htmlTechArticle10. SQL statement skills 1. A SQL statement problem: row and column conversion select * from v_temp The above view results are as follows : user_name role_name ---------------------- System Administrator Administrator...
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