最近專案中把源資料和處理資料分到了不同的好幾個資料庫中,創建多資料源也不合適,問一下能不能跨庫創建映射視圖,不然可就麻煩了。
uj5u.com熱心網友回復:
頂一下啊啊啊uj5u.com熱心網友回復:
You can use db.getSiblingDB() as an alternative to the use <database> helper. This is particularly useful when writing scripts using the mongo shell where the use helper is not available. Consider the following sequence of operations:db = db.getSiblingDB('users')
db.active.count()
https://docs.mongodb.com/manual/reference/method/db.getSiblingDB/index.html
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/65380.html
標籤:MongoDB
