常用SQL
时间:2021-01-25 10:37:33
收藏:0
阅读:0
一、复制表中数据
INSERT INTO agent(`agent_id`, `agent_type_id`, `product_no`, `yaml`, `is_anysc`, `status`, `create_time`, `update_time`) SELECT (SELECT UUID()) as `agent_id`, 8991517301972885505 as `agent_type_id`, `product_no`, `yaml`, `is_anysc`, `status`, `create_time`, `update_time` FROM agent WHERE agent_type_id = ‘0876591a-9590-4c8b-9678-21fc2744c8b4‘;
二、用更新时间到当前
UPDATE agent SET create_time = (select now()) WHERE agent_type_id = ‘8991517301972885505‘
评论(0)