Here is my table named P. Table contains information about some random people who is having different type of telephonic medium to be contacted. Here is how my table P looks like: But I need the output in following way as shown in the snippet Here we can see that Row value of Table P is mirrored as column name and Corresponding values are loaded as its row. This type output is very to analyze than original table P. Isn't right? Well To achieve this format of output, we use, PIVOT command in SQL. Here is the script and out of it in a Snippet: SELECT NAME , HOME , OFFICE , MOBILE FROM ( SELECT * FROM P ) T PIVOT ( MAX ( PHONE_NUMBER ) FOR PHONE_TYPE IN ( HOME , OFFICE , MOBILE )) OUTPUT1 ORDER BY NAME Here is how it works. The first two lines of the query is used to select what we need in the output. Next PIVOT command is used to change rows to column names where we are going to use some MultiValue func...