当前位置: 动力学知识库 > 问答 > 编程问答 >

mysql - UPDATE price (SQL)

问题描述:

I need a query for MySQL...

I need change the price divided by 2 .. something like

Table name "Armor"

ID NAME PRICE

----------------

1 Armor 200

...and query should divide the price by 2.. Like the following (which doesn't work):

UPDATE `armor`

SET `PRICE` = 'PRICE/2'

网友答案:

Remove the quotes: UPDATE armor SET PRICE=PRICE/2

分享给朋友:
您可能感兴趣的文章:
随机阅读: