Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想从一些数据构造一个邻接矩阵。假设图的顶点是用户名。如何从我的数据中选择一组用户名作为列?行应该只是select user_name from table
select user_name from table
您可以使用GROUP_CONCAT. 这里有很多关于如何应用它的帖子。
GROUP_CONCAT