Function to make power calculation in SQL

Dúvidas, dicas e truques de SQL, Select, Update, Delete, cláusulas, operações com joins, Funções em SQLs, etc
Post Reply
LC_JK
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 46
Joined: Tue, 24 Aug 2004 2:02 pm
Location: São Paulo
Contact:

Galera, does oracle have any function that calculates power for me?!

For example ... I want to know the result of the number 10 high to 2.7 ...
How do I do this?!

If it were 10 raised to 2, then I would do 10x10 .. but as there is decimal number, then complicated my life !!

Can anyone help?!
User avatar
dr_gori
Moderador
Moderador
Posts: 5024
Joined: Mon, 03 May 2004 3:08 pm
Location: Portland, OR USA
Contact:
Thomas F. G

Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered

Yes, use power.

Select all

9.2 tsas:SAS> select power(10, 2.7 ) from dual 
  2  / 
 
POWER(10,2.7) 
------------- 
   501.187234 
 
9.2 tsas:SAS>  
LC_JK
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 46
Joined: Tue, 24 Aug 2004 2:02 pm
Location: São Paulo
Contact:

Thanks....
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 15 guests