
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
Karthikeya Boyini has Published 2193 Articles

karthikeya Boyini
258 Views
You can use aggregate function AVG() for this. Let us first create a table −mysql> create table DemoTable ( Value1 int, Value2 int, Value3 int ); Query OK, 0 rows affected (0.54 sec)Insert records in the table using insert command −mysql> insert into DemoTable values(10, 20, 30); ... Read More

karthikeya Boyini
98 Views
A new DoubleBuffer can be allocated using the method allocate() in the class java.nio.DoubleBuffer. This method requires a single parameter i.e. the capacity of the buffer. It returns the new DoubleBuffer that is allocated. If the capacity provided is negative, then the IllegalArgumentException is thrown.A program that demonstrates this is ... Read More

karthikeya Boyini
137 Views
The LocalDateTime object can be queried as required using the query method in the LocalDateTime class in Java. This method requires a single parameter i.e. the query to be invoked and it returns the result of the query.A program that demonstrates this is given as follows −Example Live Demoimport java.time.*; import ... Read More

karthikeya Boyini
1K+ Views
To select all except the first character in a string, you can use SUBSTR() method. Let us first create a table −mysql> create table DemoTable ( FirstName varchar(20) ); Query OK, 0 rows affected (0.63 sec)Insert records in the table using insert command −mysql> insert into DemoTable values('Larry'); Query ... Read More

karthikeya Boyini
99 Views
A read-only double buffer can be created using the contents of a buffer with the method asReadOnlyBuffer() in the class java.nio.DoubleBuffer. The new buffer cannot have any modifications as it is a read-only buffer. However, the capacity, positions, limits etc. of the new buffer are the same as the previous ... Read More

karthikeya Boyini
3K+ Views
An immutable copy of a LocalDateTime where the required duration is subtracted from it can be obtained using the minus() method in the LocalDateTime class in Java. This method requires two parameters i.e. the duration to be subtracted and the TemporalUnit of the duration. Also, it returns the LocalDateTime object ... Read More

karthikeya Boyini
974 Views
To prevent duplicate entry, add constraint UNIQUE. Let us first create a table −mysql> create table DemoTable ( Id int, Name varchar(100) ); Query OK, 0 rows affected (0.79 sec)Here is the query to prevent MySQL double insert using UNIQUE −mysql> alter table DemoTable add constraint id_NameUnKey UNIQUE(Id, ... Read More

karthikeya Boyini
124 Views
It can be checked if a ChronoUnit is supported by the LocalDateTime class or not by using the isSupported() method in the LocalDateTime class in Java. This method requires a single parameter i.e. the ChronoUnit to check. It returns true if the ChronoUnit is supported by the LocalDateTime class and ... Read More

karthikeya Boyini
573 Views
Use MySQL JOIN to select MySQL rows where column contains same data in more than one record. Let us first create a table −mysql> create table DemoTable ( UserId int, UserName varchar(20) ); Query OK, 0 rows affected (0.54 sec)Insert records in the table using insert command −mysql> ... Read More

karthikeya Boyini
134 Views
A new DoubleBuffer with the content as a shared subsequence of the original DoubleBuffer can be created using the method slice() in the class java.nio.DoubleBuffer. This method returns the new DoubleBuffer that is read-only if the original buffer is read-only and direct if the original buffer is direct.A program that ... Read More