we can change the precedence using parenthesis. they get the highest precedence. expressions in the parenthesis get solved first. then the regular order. select 2+4+8-6+2*2/2 from dual; for example, if i want to compute this 6+2 first, i can enclose them by a parenthesis. select 2+4+8-(6+2)*2/2 from dual; 6 + 2 becomes 8, first. then the parenthesis gets removed. 8 * 2 is 16. 16 / 2 is 8. then it goes from left to right to get 6 as the final answer. so, the expressions in parenthesis get solved first followed by the regular order.
let's do hands on.
the answer is six. thank you for watching this video. sql development for beginnerscopyright â© sam dhanasekaran. copyright â© sam dhanasekaranwww.itshorts.com. unauthorized reproduction or sharing is prohibited.
No comments:
Post a Comment