Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 phpmyadmin,如果一列中的值介于 1 和 10 之间,则在另一列中输入 1,如果介于 11 和 20 之间,则输入 2 ......等等。
update your_table set another_column = case when some_column between 1 and 10 then 1 when some_column between 11 and 20 then 2 end
UPDATE table SET column1 = CEIL(column2/10);