WWW.DBVERSITY.COM
WWW.DBVERSITY.COM
Menu
  • Home
  • About us
  • Discussions
  • Login / Register
Welcome to the world of Database Technologies
Browse: Home » [MongoDB]: Unique Index

[MongoDB]: Unique Index

April 10, 2015 · by dbversity · in MongoDB

MongoDB allows you to specify a unique constraint on an index. These constraints prevent applications from inserting documents that have duplicate values for the inserted fields. > db.dbversity.createIndex( { “dbversity.post_id” : 1 } , { unique : true } )…

Categories

Categories

Copyright © 2025 WWW.DBVERSITY.COM

Powered by WordPress and Origin