sql convert single row to key/value columns
问题 I have a SQL query returning 1 row, with multiple column headers: Col 1 | Col 2 | Col 3 val 1 | Val 2 | Val 3 is there a way to convert this row to 2 columns, i.e. : Col 1 | Val 1 Col 2 | Val 2 Col 3 | Val 3 this is running on SQLServer 2008 r2 EDIT: Adding a better example Product_Code | Product_Name | Customer_Name 101 | yummy cake | derps cake shop is coming from a simple select p.prod_code, p.prod_name, c.cust_name from product p inner join customer c on p.id = c.id type query. What I