1

I have a value to store in my table

104

the only exponent that i can store is ².

any solution ?!?

Yagami Light
  • 1,756
  • 4
  • 19
  • 39

1 Answers1

2

You can try to use translate function to make a mapper table.

LOG to get exponent from ten, then use concat to get your expect result.

SELECT concat(10,translate(LOG(1000)::varchar, '123456789', '¹²³⁴⁵⁶⁷⁸⁹'))

sqlfiddle

D-Shih
  • 44,943
  • 6
  • 31
  • 51