If we PIVOT
any table and UNPIVOT
that table do we get our original table?
Asked
Active
Viewed 217 times
3

Mahmoud Gamal
- 78,257
- 17
- 139
- 164

MaxRecursion
- 4,773
- 12
- 42
- 76
2 Answers
1
No, will not always get the same table as the original table. It depends on the kind of data that we are looking at.
Check the SQL Fiddles for @Mahmoud Gamal 's data.

Ravi Singh
- 2,042
- 13
- 29
-
Please downvoter care to explain, what is the problem in this answer????????????? – Mahmoud Gamal Mar 04 '13 at 11:59
0
No you can get different result. because use aggregate function in pivote. and when you unpivote pivoted query maybe get different result, that such as aggregated orginal table on pivote fields.

mehdi lotfi
- 11,194
- 18
- 82
- 128