- 博客(3)
- 收藏
- 关注
原创 postgrel 通过命令执行文件里的sql命令
psql -U username -d myDataBase -a -f init.sql多个sql以 分号 分隔update pt_order set stockin_qty = 1000 where id = 2131891;update pt_order set stockin_qty = 300 where id = 2236567;update pt_order set stockin_qty = 450 where id = 2238290;update pt_order s.
2021-08-12 18:04:20
290
原创 mongo 批量修改自增id,并保存数据到新表
db.getCollection('202105_order').find().forEach(function(x){x['_id']=hex_md5(String(x._id)); db.getCollection('202105_orders').insert(x)})
2021-08-09 13:28:31
473
原创 mongo 跨库跨表写数据(类似mysql的 insert into ... select)
db.getSiblingDB('source_db_name').getCollection('source_table_name').find().forEach(function(x){db.getSiblingDB('dest_db_name').getCollection('dest_table_name').insert(x);})
2021-08-09 13:27:18
645
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅