Monday, September 6, 2010

Connect by, floor(), round()

Standart sql remains insufficient sometimes, Oracle develops new functions, clauses to solve these in time, here is some;
"connect by prior" clause can be used to select hierarchical information from parent-child related tables. "connect by level" clause can be used to multiply the line count.

"floor" rounds the number to the closest integer lower than itself:
select floor(3.6) from dual
"round" rounds the number to the closest integer though it provides options:
select round(3.6) from dual
select round(3.4) from dual
select round(111.444 , 1) from dual
select round(111.444 , -1) from dual

No comments:

Post a Comment