使用圆括号-SQL语言基础

时间:2024-05-15 13:24:47
【文件属性】:

文件名称:使用圆括号-SQL语言基础

文件大小:5.26MB

文件格式:PPT

更新时间:2024-05-15 13:24:47

SQL 基础

使用圆括号 * SQL> SELECT ename, sal, 12*(sal+100) 2 FROM emp; ENAME SAL 12*(SAL+100) ---------- --------- ----------- KING 5000 61200 BLAKE 2850 35400 CLARK 2450 30600 JONES 2975 36900 MARTIN 1250 16200 ... 14 rows selected. * SELECT ename, sal, 12*(sal+100) FROM emp; Using Parentheses You can override the rules of precedence by using parentheses to specify the order in which operators are executed. The example on the slide displays the name, salary, and annual compensation of employees. It calculates the annual compensation as monthly salary plus a monthly bonus of $100, multiplied by 12. Because of the parentheses, addition takes priority over multiplication.


网友评论