- Trending Categories
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
Krantik Chavan has Published 308 Articles
![Krantik Chavan](https://www.tutorialspoint.com/assets/profiles/13545/profile/60_126883-1512724834.jpg)
Krantik Chavan
2K+ Views
You can use ORDER BY SUBSTRING() to order by certain part of a string in MySQL. Let us first create a table:mysql> create table DemoTable (UserId varchar(200)); Query OK, 0 rows affected (0.68 sec)Following is the query to insert records in the table using insert command:mysql> insert into DemoTable values('USER_1234'); ... Read More
![Krantik Chavan](https://www.tutorialspoint.com/assets/profiles/13545/profile/60_126883-1512724834.jpg)
Krantik Chavan
112 Views
With this, get the nanoseconds in days, hours and minutes. At first, set the Duration:Duration d1 = Duration.ofDays(5); Duration d2 = Duration.ofHours(20); Duration d3 = Duration.ofMinutes(15);Convert the above Duration to nanoseconds:System.out.println("Nanoseconds in 5 days = "+d1.toNanos()); System.out.println("Nanoseconds in 20 hours = "+d2.toNanos()); System.out.println("Nanoseconds in 15 minutes = "+d3.toNanos());Exampleimport java.time.Duration; public ... Read More
![Krantik Chavan](https://www.tutorialspoint.com/assets/profiles/13545/profile/60_126883-1512724834.jpg)
Krantik Chavan
989 Views
Create Instant from Epoch SecondExampleimport java.time.Instant; public class Demo { public static void main(String[] args) { Instant instant = Instant.ofEpochSecond(282829279); System.out.println(instant); } }Output1978-12-18T11:41:19ZCreate Instant from Epoch MillisecondsExampleimport java.time.Instant; public class Demo { public static void main(String[] args) { ... Read More
![Krantik Chavan](https://www.tutorialspoint.com/assets/profiles/13545/profile/60_126883-1512724834.jpg)
Krantik Chavan
76 Views
In order to remove every column in a table in MySQL, you can use DROP TABLE command. Following is the syntax:DROP TABLE yourTableName;Let us first create a table:mysql> create table DemoTable ( StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY, StudentFirstName varchar(20), StudentLastName varchar(20), StudentAge int, ... Read More
![Krantik Chavan](https://www.tutorialspoint.com/assets/profiles/13545/profile/60_126883-1512724834.jpg)
Krantik Chavan
171 Views
Create an Instant and get an Instant using milliseconds passed as parameter from the epoch of 1970-01- 01T00:00:00Z. This is done using ofEpochMilli():Instant instant = Instant.ofEpochMilli(342627282920l);Now, get the Epoch seconds from Instant:instant.getEpochSecond();Exampleimport java.time.Instant; public class Demo { public static void main(String[] args) { Instant instant = ... Read More
![Krantik Chavan](https://www.tutorialspoint.com/assets/profiles/13545/profile/60_126883-1512724834.jpg)
Krantik Chavan
1K+ Views
Probability Density Function (pdf), is a function that describes the relative likelihood for this random variable to take on a given value. It is also called as density of a continuous random variable.The probability of the random variable fall within a particular range of values is given by the integral ... Read More
![Krantik Chavan](https://www.tutorialspoint.com/assets/profiles/13545/profile/60_126883-1512724834.jpg)
Krantik Chavan
176 Views
Create an Instant and get an Instant using milliseconds passed as parameter from the epoch of 1970-01- 01T00:00:00Z. This is done using ofEpochMilli():Instant instant = Instant.ofEpochMilli(342627282920l);Now, get the Epoch milliseconds from Instant:instant. toEpochMilli();Exampleimport java.time.Instant; public class Demo { public static void main(String[] args) { Instant instant ... Read More
![Krantik Chavan](https://www.tutorialspoint.com/assets/profiles/13545/profile/60_126883-1512724834.jpg)
Krantik Chavan
345 Views
Yes, you can write own MySQL function to use in MySQL queries. Following is the syntax:DELIMITER // CREATE FUNCTION yourFunctionName(optional parameters)) RETURNS yourDataType DETERMINISTIC NO SQL BEGIN yourStatements1 . . . . N END // DELIMITER ;We have used the CREATE FUNCTION above to create a custom function.Let us create ... Read More
![Krantik Chavan](https://www.tutorialspoint.com/assets/profiles/13545/profile/60_126883-1512724834.jpg)
Krantik Chavan
6K+ Views
The Central Processing Unit and the main memory are always very accurate and fast as compared with electromechanical input or output devices like printers, etc. Here in this case it is essential for us that the data lines of the computer are not engaged for a long time during communication ... Read More
![Krantik Chavan](https://www.tutorialspoint.com/assets/profiles/13545/profile/60_126883-1512724834.jpg)
Krantik Chavan
18K+ Views
Let us first set two Instants with ofEpochSeconds() method using seconds from the epoch of 1970-01- 01T00:00:00Z.Now get the duration between the above two Instant:Duration res = Duration.between(one, two);Exampleimport java.time.Duration; import java.time.Instant; public class Demo { public static void main(String[] args) { Instant one = Instant.ofEpochSecond(1845836728); ... Read More