-
[Mongo] 간단한 몽고DB 명령어개발/JS 2018. 7. 9. 22:13
> mongo
> use test
: test 데이터베이스를 사용한다 ( test데이터베이스가 없는 경우 새로 생성한다.)
> db
> show dbs
: db 명령어는 현재 사용중인 데이터베이스를 확인할 수 있다.
: show dbs 명령어는 내가 만든 데이터베이스 리스트들을 확인할 수 있다.
> show collections
: 내가 만든 collection 들을 확인할 수 있다.
> db.test.find()
: test 컬렉션의 모든 다큐먼트 리스트 확인할 수 있다.( 현, test 데이터베이스다, test컬렉션은 test데이터베이스 안에 있음)
> db.test.remove({})
: test 컬렉션의 모든 다큐먼트를 제거할 수 있다.
'개발 > JS' 카테고리의 다른 글
[ERROR]GET http://localhost/socket.io/?EIO=3&transport=polling&t=MIEj9iB 0 () (1) 2018.07.12 [ERROR] Uncaught TypeError: Cannot read property 'equal' of undefined (0) 2018.07.09 [ERROR] mongoskin에서 TypeError: Cannot read property 'apply' of undefined (0) 2018.06.25 [error] Failed to load c++ bson extension, using pure JS version (0) 2018.06.24 [npm] Working with package.json (0) 2018.04.16