此处要把:
MariaDB [guanzhi_removeDuplicate]> SHOW COLUMNS from selection; +—————–+————-+——+—–+———+—————-+ | Field | Type | Null | Key | Default | Extra | +—————–+————-+——+—–+———+—————-+ | id | int(10) | NO | PRI | NULL | auto_increment | | staff_id | int(10) | NO | MUL | NULL | | | car_sn | varchar(10) | NO | | NULL | | | bid_price | int(10) | NO | | NULL | | | created_at | int(10) | NO | | NULL | | | created_at_gmt8 | int(10) | NO | | NULL | | | sequence | int(10) | NO | | NULL | | +—————–+————-+——+—–+———+—————-+ 7 rows in set (0.00 sec) |
中的:
created_at
的值,经过变换:
从GMT标准时间转换为GMT+8的时间,然后赋值给:
created_at_gmt8
列
mysql set column based on some column
sql – mysql update column with value from another table – Stack Overflow
Mysql – How to update a column using another column’s value plus some strings – Stack Overflow
MySQL – UPDATE query based on SELECT Query – Stack Overflow
主要就是用UPDATE命令
然后想办法去:
转载请注明:在路上 » [未解决]mysql中基于已有列的值赋值新列的值