多添件修改
要求:把 sex=‘男’,age最大的 对应的sal 改为 700,数据结构如下图:
1.查询sex=‘男’,age最大的
sql : select max(age) m from emp where sex = ‘男’
select m FROM (select max(age) m from emp where sex = ‘男’) t
2.修改

sql: update emp set sal = 700 where age = (select m FROM (select max(age) m from emp where sex = ‘男’) t );

3.收工

sql 多条件修改

相关文章:

  • 2022-02-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-16
猜你喜欢
  • 2022-01-14
  • 2021-10-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-03
  • 2021-08-19
相关资源
相似解决方案