- 博客(2)
- 收藏
- 关注
原创 oracle decode 用法
select decode(sign(salary-8000),1,salary*1.15,-1,salary*1.2,salary*1.15)from employee DECODE的语法:DECODE(value,if1,then1,if2,then2,if3,then3,...,else),表示如果value等于if1时,DECODE函数的结果返回then1,...,如果不等于任何一个if值,则返回else。 ...
2022-01-23 19:59:36
314
原创 将字段的值修改
转载 我自己的思路如下:写出来如下,但是如果b中不存在a中的id,psw将会覆盖成null 1. update A set pwd = (select password from B where userid = A.id); where id in (select userid from B); 报考别人的写法 2. 如果B表的userid为主键的话,,可以使用关联更新.. update ( select a.pwd pwd,b.password from A,B where...
2022-01-23 19:34:57
453
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅