hc学习平台

 找回密码
 立即注册
搜索
热搜: 活动 交友 javakc
 › zhangjiafu › 日志

修改数据

2021-01-08 18:21:21 查看(439) 回复(0)

按如下要求写出sql语句:

  1. 修改客户编号为【102】的客户的英文姓名为【William
  2. 将北京客户的信用积分,增加50分
  3. 为年龄大于30岁的客户,增加信用积分 100分
  4. 修改备注为【工资】的交易记录,将备注信息改为【发薪水】
  5. 修改银行卡的存款,为每个银行卡,发1%的存款利息,
  6. 将密码加密处理:倒置所有的密码:123456修改为654321


-- 1

update user2

set ename='William'

where userid='102'

-- 2

update user2

set credit=credit +50

where city='北京'

-- 3

update user2

set credit=credit +100

where name in (select name from user2 where substring(personId,7,4)<'1991')

-- 4

update transinfo2

set remark='发薪水'

where remark='工资'

-- 5

update card2

set money=money*1.01

where true;

-- 6

update card2

set password=reverse(`password`)

where true;

评论 (0 个评论)

facelist

全部作者的其他最新日志



站点统计|举报|Archiver|手机版|小黑屋|Comsenz Inc.

GMT+8, , Processed in 0.195171 second(s), 9 queries .

Powered by javakc! X1.0

© 2004-2014 javakc

f1208.com 备案号:京ICP备14030918号-1

返回顶部