修改YF_ZYFYMX数据库当jlxh大于5小于8时将他的jgid改为330108002
时间: 2023-04-01 19:00:25 浏览: 48
我可以回答这个问题。您可以使用以下 SQL 语句来实现:
UPDATE YF_ZYFYMX SET jgid = '330108002' WHERE jlxh > 5 AND jlxh < 8;
这将把 YF_ZYFYMX 数据库中 jlxh 大于 5 小于 8 的记录的 jgid 修改为 330108002。
相关问题
翻译一下delete from zy_fymx where jlxh in(select min(jlxh) jlxh from zy_fymx a where exists(select 1 from zy_fymx b where a.fyxh = b.fyxh and a.zyh = b.zyh and a.yzxh = b.yzxh and b.fysl < 0 and b.zyh = 389085 and a.fysl = - b.fysl ) group by a.fyxh,a.zyh,a.yzxh union all select max(jlxh) jlxh from zy_fymx a where exists(select 1 from zy_fymx b where a.fyxh = b.fyxh and a.zyh = b.zyh and a.yzxh = b.yzxh and b.fysl > 0 and b.zyh = 389085 and a.fysl = - b.fysl )
翻译结果如下:
删除 zy_fymx 表中满足以下条件的记录:
- jlxh 在 (select min(jlxh) jlxh from zy_fymx a where exists(select 1 from zy_fymx b where a.fyxh = b.fyxh and a.zyh = b.zyh and a.yzxh = b.yzxh and b.fysl < 0 and b.zyh = 389085 and a.fysl = - b.fysl ) group by a.fyxh,a.zyh,a.yzxh) 的结果中;
- 或者在 (select max(jlxh) jlxh from zy_fymx a where exists(select 1 from zy_fymx b where a.fyxh = b.fyxh and a.zyh = b.zyh and a.yzxh = b.yzxh and b.fysl > 0 and b.zyh = 389085 and a.fysl = - b.fysl )) 的结果中。
以上是对 SQL 查询语句的翻译。
解释一下代码 recipeInfoMap.put("billCode", djcfMap.get("JLXH")!=null ? djcfMap.get("JLXH").toString():"");
这段代码的意思是,将一个键值对放入一个名为recipeInfoMap的map中,键为"billCode",值为djcfMap中键为"JLXH"的值,若该值不为空,则将其转换成字符串后存入,否则存入空字符串。其中,djcfMap是另一个map对象。这段代码的作用可能是将一份处方的编号存入recipeInfoMap中,以备后续使用。