Home  >  Article  >  Database  >  批量更新

批量更新

WBOY
WBOYOriginal
2016-06-07 15:55:281035browse

项目中进行产品升级,数据库有所变化,为了升级以前的产品,在一个一个写update脚本,最后发现是有规律的!!!!!还是应该多思考,差点就的多些好几行啊 update ep_sys_right_item a set a.function_entity=cc/repo||substr(a.FUNCTION_ENTITY,3,(length(a

 

项目中进行产品升级,数据库有所变化,为了升级以前的产品,在一个一个写update脚本,最后发现是有规律的!!!!!还是应该多思考,差点就的多些好几行啊

\

update ep_sys_right_item a set a.function_entity='cc/repo'||substr(a.FUNCTION_ENTITY,3,(length(a.FUNCTION_ENTITY)-2))where a.right_class_code='CC_11';

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn