(c) Microsoft Corporation. All rights reserved. C:\Users\ACER>mongosh Current Mongosh Log ID: 66611d66e3c4dda298cdcdf5 Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.2.6 Using MongoDB: 7.0.11 Using Mongosh: 2.2.6 For mongosh info see: https://docs.mongodb.com/mongodb-shell/ ------ The server generated these startup warnings when booting 2024-06-04T11:56:28.597+05:30: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted ------ test> use students switched to db students students> db.data.insertOne({'Name':'Debadatta', age:19}) { acknowledged: true, insertedId: ObjectId('66611e1ae3c4dda298cdcdf6') } students> db.data.insertMany([ {'Name':'Debadatta', age:19}, {'Name':'Jyotiranjan', age:20}, {'Name':'Aditya', ...
//There are many types of simple comparison where we shuld only focus for limited time //ex-Equal,Greaterthan,Lessthan etc // console.log("2">1); // console.log("02">1); // console.log(null > 0); // console.log(null == 0); // console.log(null >= 0); //Avoid this type of comparison as much as possible // === it compares the datatypes also console . log ( "2" === 2 ); //False because of different datatypes //Summary //Primitive //7 tytpes-String,Number,Boolean,Null,undefined,Symbol,BigInt //Reference (Non Primitive) //Array, Objects, Function, //+++++++++++++++++++++++++++++++++ //Memory //Stack(Primitive), Heap(Non-Primitive)
create database stud1; create database stud2; create database college; create database newcollege; create database if not exists college; drop database stud2; drop database if exists stud1; use college; create table student ( id int primary key, name varchar(50), age int not null ); insert into student values(1, "Debadatta", 18); insert into student values(2, "Jyoti", 18); insert into student values(3, "Aditya", 50); insert into student values(4, "Arabinda", 75); select * from student; show databases; show tables; use newcollege; create table rollnum( rollno int primary key, name varchar(50) ); select * from rollnum; insert into rollnum (rollno, name) values (101, "Sunil"), (102, "Arjun"), (103, "pritam"); select * from rollnum;
Comments
Post a Comment