在SQL语句中运用数学表达式-SQL语言基础

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

文件名称:在SQL语句中运用数学表达式-SQL语言基础

文件大小:5.26MB

文件格式:PPT

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

SQL 基础

在SQL语句中运用数学表达式 * SQL> SELECT ename, sal, sal+300 2 FROM emp; ENAME SAL SAL+300 ---------- --------- --------- KING 5000 5300 BLAKE 2850 3150 CLARK 2450 2750 JONES 2975 3275 MARTIN 1250 1550 ALLEN 1600 1900 ... 14 rows selected. * Using Arithmetic Operators The example in the slide uses the addition operator to calculate a salary increase of $300 for all employees and displays a new SAL+300 column in the output. Note that the resultant calculated column SAL+300 is not a new column in the EMP table; it is for display only. By default, the name of a new column comes from the calculation that generated it—in this case, sal+300. Note: SQL*Plus ignores blank spaces before and after the arithmetic operator.


网友评论