- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Arushi has Published 157 Articles
Arushi
4K+ Views
Following are the notable differences between HashMap and ConcurrentHashMap classes in Java. HashMapConcurrentHashMapSynchronizedHashMap is not synchronized.ConcurrentHashMap is synchronized.Thread SafeHashMap is not thread safe.ConcurrentHashMap is thread safe.Iterator typeHashMap iterator is fail-fast and ArrayList throws ConcurrentModificationException if concurrent modification happens during iteration.ConcurrentHashMap is fail-safe and it will never throw ConcurrentModificationException during iteration.Null valuesHashMap ... Read More
Arushi
65 Views
When we use RAND() function along with both ORDER BY and LIMIT clause in a query, MySQL returns the different set of rows or values each time. To understand it considers a table ‘Employee’ having the following records −mysql> Select * from Employee; +----+--------+--------+ | ID | Name | ... Read More
Arushi
110 Views
MySQL REVERSE() function make it possible to invert a string. Its syntax is as follows −SyntaxREVERSE(STR)Here, STR is a string which we want to invert.Examplemysql> Select REVERSE('MySQL'); +------------------+ | REVERSE('MySQL') | +------------------+ | LQSyM | +------------------+ 1 row in set (0.05 sec)
Arushi
906 Views
When we use FIND_IN_SET() function in WHERE clause then it searches the search string within the given string as specified in the argument and retrieves all the columns from concerned rows. Following is an example to demonstrate it −ExampleIn this example, we are getting the columns from ‘Student’ table where ... Read More
Arushi
2K+ Views
Both the functions are string functions and return the number of characters present in the string. But they differ in the concept that CHAR_LENGTH() function measures the string length in ‘characters’ whereas LENGTH() function measures the string length in ‘bytes’. In other words, we can say that CHAR_LENGTH() function is ... Read More
Arushi
76 Views
Followings are the ways in which we can write a query that returns only records that matches multiple conditions on the same columnBy using ‘OR’ logical operatorAs we know that MySQL ‘OR’ operator compares two expressions and returns TRUE if either of the expression is TRUE. Following example demonstrate that ... Read More
Arushi
151 Views
CREATE command is a DDL command which is used to create a table or a database. The syntax for creating table and database with CREATE command is as follows −The syntax for creating a database −Create database database-name;Examplemysql> Create database query; Query OK, 1 row affected (0.04 sec)In the example ... Read More
Arushi
517 Views
The following table will provide us the differences between PRIMARY KEY and UNIQUE constraint −PRIMARY KEYUNIQUE Constraint1. Only one Primary key can be created on a table.1. More than one UNIQUE Constraints can be added to a table.2. Primary key creates clustered index by default.2. UNIQUE Constraint creates a non-clustered ... Read More
Arushi
154 Views
As we know the AUTO_INCREMENT column must have the PRIMARY KEY constraint on it also hence when we will try to drop PRIMARY KEY constraint from the AUTO_INCREMENT column the MySQL returns an error message regarding the incorrect table definition. The example below will demonstrate it −ExampleSuppose we have ‘Accounts’ ... Read More
Arushi
2K+ Views
To get the time difference between two timestamps, try to run the following code. Here, we are calculating the total number of hours, minutes and seconds between two timestamps −ExampleLive Demo JavaScript Dates ... Read More