算数运算符/空值问题

 

select * |{[DISTINCT] column |expression [alias],...} from table;

--虚表(dual)

select 5+3,5-3,5*3,5/2 from dual;

select 'Hello World',100 from dual;

算数运算符/空值问题

salary*1.25不会产生新的数据,我们称这种状况为衍生列,计算列

算数运算符/空值问题

若想优先级为加减,可以加括号;

 

select * from employee_id,last_name,salary,salary*commission_pct,salary+salary*commission_pct from employee;
--员工编号,姓名,工资,奖金金额,实发工资(工资+奖金)

算数运算符/空值问题

算数运算符/空值问题

算数运算符/空值问题

表格结果都为空值

 

相关文章:

  • 2021-06-30
  • 2021-06-09
  • 2021-09-14
  • 2022-12-23
  • 2022-12-23
  • 2021-09-01
  • 2022-12-23
  • 2021-06-08
猜你喜欢
  • 2022-12-23
  • 2021-07-17
  • 2021-09-28
  • 2021-10-20
  • 2021-09-27
  • 2022-12-23
  • 2021-10-12
相关资源
相似解决方案