Home > Database > Mysql Tutorial > MYSQL把负数变为正数_MySQL

MYSQL把负数变为正数_MySQL

WBOY
Release: 2016-06-01 13:44:51
Original
5880 people have browsed it

bitsCN.com

具体MYSQL语句为
update 表 set 字段=abs(字段);
例如zencart 格式为
update zen_products set products_price=abs(products_price);
就可以批量把价格负数的改成正数了

摘自 Shine的圣天堂-〃敏〃

bitsCN.com
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template