-
Notifications
You must be signed in to change notification settings - Fork 1
/
19.sql
45 lines (45 loc) · 1.19 KB
/
19.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
17-5-22 tue
> use C
switched to db C
> db.empl.insert({name:"dsflkj",salary:40000,role:"KP"})
WriteResult({ "nInserted" : 1 })
> db.empl.insert({name:"dghjlksfsj",salary:60000,role:"KP"})
WriteResult({ "nInserted" : 1 })
> db.empl.insert({name:"sfsdfskjuhdj",salary:100000,role:"HR"})
WriteResult({ "nInserted" : 1 })
> db.empl.insert({name:"Alan",salary:200000,role:"HR"})
WriteResult({ "nInserted" : 1 })
> db.empl.insert({name:"Eldhose",salary:500000,role:"Developer"})
WriteResult({ "nInserted" : 1 })
> db.empl.find().pretty()
{
"_id" : ObjectId("62833f41c0626801780ceb4a"),
"name" : "dsflkj",
"salary" : 40000,
"role" : "KP"
}
{
"_id" : ObjectId("62833fa0c0626801780ceb4b"),
"name" : "dghjlksfsj",
"salary" : 60000,
"role" : "KP"
}
{
"_id" : ObjectId("62833fbdc0626801780ceb4c"),
"name" : "sfsdfskjuhdj",
"salary" : 100000,
"role" : "HR"
}
{
"_id" : ObjectId("62833fcdc0626801780ceb4d"),
"name" : "Alan",
"salary" : 200000,
"role" : "HR"
}
{
"_id" : ObjectId("62833fe5c0626801780ceb4e"),
"name" : "Eldhose",
"salary" : 500000,
"role" : "Developer"
}
>