Kumar Varma has Published 110 Articles

How can we use ORDER BY clause while calculating the Date?

Kumar Varma

Kumar Varma

Updated on 20-Jun-2020 13:53:46

89 Views

It would be more convenient to find a record if we will use ORDER BY clause while calculating the date. To understand it, we have the data from table ‘Collegedetail’ as follows −mysql> Select * from Collegedetail; +------+---------+------------+ | ID   | Country | Estb       | +------+---------+------------+ ... Read More

How can we check for NULL in a MySQL query?

Kumar Varma

Kumar Varma

Updated on 20-Jun-2020 13:03:23

166 Views

With the help of IS NULL operator, we can check for NULL in a MySQL query. We cannot use = (comparison operator) because as we know that NULL is not a value. Following example using the data from ‘employee’ table will exhibit it −Examplemysql> Select * from Employee WHERE Salary ... Read More

Which MySQL function can be used to find out the length of the string in bits?

Kumar Varma

Kumar Varma

Updated on 20-Jun-2020 08:17:21

59 Views

MySQL BIT_LENGTH() string function is used to get the length of the string in bits.SyntaxBIT_LENGTH(Str)Here Str, the argument of BIT_LENGTH() function, is the string whose BIT_LENGTH value is to be retrieved. Str can be a character string or number string. If it is a character string then it must be ... Read More

What MySQL returns if sub-query, used to assign new values in the SET clause of UPDATE statement, returns no rows?

Kumar Varma

Kumar Varma

Updated on 20-Jun-2020 07:07:27

74 Views

In this case, MySQL will provide a NULL value to the SET clause. Following example will demonstrate it −Examplemysql> Select * from student; +----+---------+-----------+ | Id | Name    | grade     | +----+---------+-----------+ | 1  | Rahul   | Good      | | 2  | Gaurav ... Read More

How can I insert the values in columns without specifying the names of the column in MySQL INSERT INTO statement?

Kumar Varma

Kumar Varma

Updated on 19-Jun-2020 13:55:10

2K+ Views

For inserting the values in the column without specifying the names of the columns in INSERT INTO statement, we must give the number of values that matches the number of columns in the table along with taking care about the data type of that column too.ExampleIn the example below we ... Read More

How to insert NULL keyword as a value in a character type column of MySQL table having NOT NULL constraint?

Kumar Varma

Kumar Varma

Updated on 19-Jun-2020 11:31:09

138 Views

It is quite possible to insert the NULL keyword as a value in a character type column having NOT NULL constraint because NULL is a value in itself. Following example will exhibit it −ExampleSuppose we have a table test2 having character type column ‘Name’ along with NOT NULL constraint on ... Read More

When to use C over C++, and C++ over C?

Kumar Varma

Kumar Varma

Updated on 18-Jun-2020 13:05:03

1K+ Views

If you would like an application that works directly with computer hardware or deals with the desktop app development, C++ is an good option. C++ programs include server-side applications, networking, gaming, and even device drivers for your PC. However, if you need to code truly tiny systems, using C will ... Read More

How to get Euler's constant value in JavaScript?

Kumar Varma

Kumar Varma

Updated on 18-Jun-2020 08:25:25

584 Views

To get Euler’s constant value in JavaScript, use the Math E property. This is a Euler's constant and the base of natural logarithms, approximately 2.718.ExampleYou can try to run the following code to get Euler’s constant value in JavaScript −Live Demo           JavaScript Math E Property ... Read More

Java (JVM) Memory Types

Kumar Varma

Kumar Varma

Updated on 18-Jun-2020 07:14:20

3K+ Views

Java Virtual Machine is a program/software which takes Java bytecode (.class files)and converts the byte code (line by line) into machine understandable code.JVM contains a module known as a class loader. A class loader in JVM loads, links and, initializes a program. It−Loads the class into the memory. Verifies the byte code ... Read More

What is the difference between single and double quotes in JavaScript?

Kumar Varma

Kumar Varma

Updated on 16-Jun-2020 11:02:43

117 Views

In JavaScript, use any of the single or double quotes for a string. However, you should be consistent in whatever you select. Single and double quotes are the same in JavaScript −"Let us say: \"Life's good!\"" 'Let us say: "Life\'s good!"' “Let us say: \"Life\'s good!\"" 'Let us say: \"Life\'s ... Read More

Advertisements