SQL

unpivot in sql

Pivot and Unpivot in SQL || How to convert rows to Columns in sql

What is Pivot and Unpivot in SQL

In this article, we will learn about Pivoting and unpivoting data in SQL. But before how to do Pivot and Unpivot in SQL we must understand what is pivot and unpivot in SQL. In SQL Oracle, Pivot and Unpivot are relational operators that are used to transform one SQL table into another SQL  table in order to achieve a simpler view of the data. In simple terms, we can say that SQL Pivot operator converts the unique values from one column values which are in rows into different columns. Basically, it convert rows to columns in SQL. The SQL Unpivot operator does the opposite that is it transforms the different columns into rows identified by these unique columns name in a new column.

Pivot and Unpivot in SQL || How to convert rows to Columns in sql Read More »

Scroll to Top