PostgreSQL convert columns to rows? Transpose?

前端 未结 5 1066
失恋的感觉
失恋的感觉 2020-11-28 08:50

I have a PostgreSQL function (or table) which gives me the following output:

Sl.no    username    Designation    salary   etc..
 1        A           XYZ             


        
5条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-28 09:13

    There is no proper way to do this in plain SQL or PL/pgSQL.

    It will be way better to do this in the application, that gets the data from the DB.

提交回复
热议问题