Oracle Vs MS-SQL : PIVOT
Pivot function exists both in Oracle as well as MS-SQL. It is used to convert column result into rows for the specific values. There is not much difference between Oracle and MS-SQL. It can be better explained with the help of example. Let’s create a table called ProductSales which stores the information about sales person, product and the sales amount. create table ProductSales ( salesperson varchar(50), Product varchar(20), salesAmount decimal(14,4) ) Insert the below values insert into ProductSales values ('Jithesh','Pickles',100) insert into ProductSales values ('Jithesh','Pickles',25) insert into ProductSales values ('Jithesh','Oranges',300) insert into ProductSales values ('kb','Oranges',50) insert into ProductSales values ('kn','Oranges',500) insert into ProductSales values ('kn','Pickles',44) Table looks like salesperson