
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Nishtha Thakur has Published 498 Articles

Nishtha Thakur
1K+ Views
To strip all spaces from a column in MySQL, you can use REPLACE() function. Following is the syntax −update yourTableName set yourColumnName=REPLACE(yourColumnName, ' ', '' );Let us first create a table −mysql> create table stripAllSpacesDemo -> ( -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> Name ... Read More

Nishtha Thakur
679 Views
Before getting into example, we should know what sqlite data base in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the relational database features. In order to ... Read More

Nishtha Thakur
147 Views
Use ORDER BY IF() to arrange data in a specific order. Following is the syntax −select *from yourTableName ORDER BY IF(yourColumnName=yourValue1 OR yourColumnName=yourValue2 OR yourColumnName=yourValue3, yourColumnName, ~yourColumnName) ASC;Let us first create a table −mysql> create table arrangeDataInSpecificOrder -> ( -> StudentId int, -> StudentName varchar(20) -> ... Read More

Nishtha Thakur
654 Views
To clone a collection in MongoDB, you can use the forEach() method. Let us first create a collection with a document.The query to create a collection with a document is as follows −> db.studentInformation.insertOne({"StudentName":"Chris"}); { "acknowledged" : true, "insertedId" : ObjectId("5c8bc15780f10143d8431e21") } > db.studentInformation.insertOne({"StudentName":"Robert"}); { "acknowledged" : ... Read More

Nishtha Thakur
1K+ Views
To find if a column is auto_increment in MySQL, you can use the following syntax −select COLUMN_NAME from information_schema.columns where TABLE_SCHEMA='yourDatabaseName' and TABLE_NAME='yourTableName' and EXTRA like '%auto_increment%';Let us first create a table. Here, ClientId is set AUTO_INCREMENT −mysql> create table autoIncrementTableDemo -> ( -> ClientId int NOT NULL ... Read More

Nishtha Thakur
972 Views
To convert UNIX timestamp into a human-readable format, use the FROM_UNIXTIME() method.Let us first create a table −mysql> create table timeConversionDemo -> ( -> dateTimeConversion bigint -> ); Query OK, 0 rows affected (0.45 sec)Following is the query to insert records in the table using insert command ... Read More

Nishtha Thakur
836 Views
You can use $set operator for this. The syntax is as follows −db.yourCollectionName.update({ }, {'$set': "yourFieldName": "yourValue" }, false, true);To understand the above syntax, let us create a collection with the document. The query to create a collection with a document is as follows −> db.unconditionalUpdatesDemo.insertOne({"ClientName":"Larry", "ClientAge":24}); { "acknowledged" ... Read More

Nishtha Thakur
978 Views
To display all the fields that contain a capital letter, use the RLIKE that performs a pattern match of a string expression against a pattern.Let us first create a table −mysql> create table contains_capital_letterDemo -> ( -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> Name varchar(100) ... Read More

Nishtha Thakur
1K+ Views
To select distinct value from one column only, you can use aggregate function MAX() along with GROUP BY. Let us first create a table −mysql> create table distinctFromOneColumn -> ( -> StudentId int, -> StudentName varchar(100) -> ); Query OK, 0 rows affected (0.77 sec)Following is ... Read More

Nishtha Thakur
3K+ Views
QueueThe queue which is implemented as FIFO where insertions are done at one end (rear) and deletions are done from another end (front). The first element that entered is deleted first.Queue operations are −EnQueue (int data) − Insertion at rear endint DeQueue()− Deletion from front endThis is a C++ program ... Read More