Karthikeya Boyini has Published 2383 Articles

MySQL order by 0 first and then display the record in descending order?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:25

304 Views

In order to order by 0 first and then largest, you can use the below syntax −select *from yourTableName order by yourColumnName=0 DESC, yourColumnName DESC;Let us first create a table −mysql> create table DemoTable (    Value int ); Query OK, 0 rows affected (0.65 sec)Insert records in the table ... Read More

LocalDateTime plusYears() method in Java

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:25

64 Views

An immutable copy of a LocalDateTime object where some years are added to it can be obtained using the plusYears() method in the LocalDateTime class in Java. This method requires a single parameter i.e. the number of years to be added and it returns the LocalDateTime object with the added ... Read More

DoubleBuffer array() method in Java

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:25

74 Views

A double array for the buffer can be obtained using the method array() in the class java.nio.DoubleBuffer. If the returned array is modified, then the contents of the buffer are also similarly modified and vice versa. If the buffer is read-only, then the ReadOnlyBufferException is thrown.A program that demonstrates this ... Read More

LocalDateTime isAfter() method in Java

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:25

94 Views

It can be checked if a particular LocalDateTime is after the other LocalDateTime in a timeline using the isAfter() method in the LocalDateTime class in Java. This method requires a single parameter i.e. the LocalDateTime object that is to be compared. It returns true if the LocalDateTime object is after ... Read More

ShortBuffer equals() method in Java

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:25

80 Views

The equality of two buffers can be checked using the method equals() in the class java.nio.ShortBuffer. Two buffers are equal if they have the same type of elements, the same number of elements and same sequence of elements. The method equals() returns true if the buffers are equal and false ... Read More

LocalDateTime isEqual() method in Java

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:25

78 Views

It can be checked if two LocalDateTime objects are equal or not using the isEqual() method in the LocalDateTime class in Java. This method requires a single parameter i.e. the LocalDateTime object that is to be compared. It returns true if the two LocalDateTime objects are equal and false otherwise.A ... Read More

LocalDateTime plusHours() method in Java

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:25

92 Views

An immutable copy of a LocalDateTime object where some hours are added to it can be obtained using the plusHours() method in the LocalDateTime class in Java. This method requires a single parameter i.e. the number of hours to be added and it returns the LocalDateTime object with the added ... Read More

ShortBuffer toString() method in Java

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:25

99 Views

A string that provides the buffer state in a summary can be obtained using the method toString() in the class java.nio.ShortBuffer. This method requires no parameters and it returns the buffer state in a summary using a string.A program that demonstrates this is given as follows −Example Live Demoimport java.nio.*; import ... Read More

LocalDateTime plusMinutes() method in Java

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:25

72 Views

An immutable copy of a LocalDateTime object where some minutes are added to it can be obtained using the plusMinutes() method in the LocalDateTime class in Java. This method requires a single parameter i.e. the number of minutes to be added and it returns the LocalDateTime object with the added ... Read More

Provider keySet() method in Java

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:25

61 Views

The property keys in the provider can be viewed using an unmodifiable Set view using the method keySet() in the class java.security.Provider. This method requires no parameters and it returns the unmodifiable Set view for the property keys as required.A program that demonstrates this is given as follows −Example Live Demoimport ... Read More

Advertisements