How MySQL SUM() function evaluates if the column having NULL values too?

George John
Updated on 30-Jul-2019 22:30:21

1K+ Views

Suppose if we are calculating the sum of the values of a column which also have NULL values then MySQL SUM() function ignores the NULL values and does the sum of the rest of the values. To understand it, consider the following example of table ‘employee’, having following details − mysql> Select * from Employee; +----+--------+--------+ | ID | Name | Salary | +----+--------+--------+ | 1 | Gaurav | 50000 | | 2 | Rahul | 20000 | | 3 | Advik | 25000 | | 4 | ... Read More

How to set JAVA_HOME for Java in Linux?

Ayyan
Updated on 30-Jul-2019 22:30:21

307 Views

Assuming you have installed Java in \usr\local\java\jdk directory −if you use bash as your shell, then you would add the following line to the end of your '.bashrc: export JAVA_HOME=\usr\local\java\jdk'

How can I search data from MySQL table based on similar sound values?

Sai Subramanyam
Updated on 30-Jul-2019 22:30:21

168 Views

With the help of SOUNDS LIKE operator, MySQL search the similar sound values from the table. Syntax Expression1 SOUNDS LIKE Expression2 Here, both Expression1 and Expression2 will be compared based on their English pronunciation of sound. Example Following is an example from ‘student’ table which will match the two expressions based on the pronunciation of sound mysql> Select Id, Name, Address, Subject from student where name sounds like 'hrst'; +------+---------+---------+----------+ | Id | Name | Address | Subject | +------+---------+---------+----------+ | 15 | Harshit | Delhi | Commerce | +------+---------+---------+----------+ 1 row in set (0.00 sec)

How to set JAVA_HOME for Java in Mac OS?

Manikanth Mani
Updated on 30-Jul-2019 22:30:21

777 Views

Assuming you have installed Java in \usr\local\java\jdk directory −if you use bash as your shell, then you would add the following line to the end of your '.bashrc: export JAVA_HOME=\usr\local\java\jdk'

What is the type of string literals in C and C++?

Lakshmi Srinivas
Updated on 30-Jul-2019 22:30:21

898 Views

In C the type of a string literal is a char[]. In C++, an ordinary string literal has type 'array of n const char'. For example, The type of the string literal "Hello" is "array of 6 const char". It can, however, be converted to a const char* by array-to-pointer conversion.Note that Array-to-pointer conversion results in a pointer to the first element of the array.

How OLD and NEW keywords enable us to access columns in row affected byna trigger?

Sai Subramanyam
Updated on 30-Jul-2019 22:30:21

1K+ Views

As we know that in trigger definition, we can refer to columns of the row being inserted, updated or deleted. Following are the ways OLD and NEW keywords enable us to access columns − We must have to prefix the column name with a qualifier of OLD to refer to a value from the original row. We must have to prefix the column name with a qualifier of NEW to refer to a value in the new row. Now, the use of OLD and NEW must be done appropriately because the triggering event Determines which of them are ... Read More

What is the package for String Class in Java?

Jai Janardhan
Updated on 30-Jul-2019 22:30:21

5K+ Views

String class belongs to the java.lang package.

What is the difference between >> and >>> operators in Java?

Samual Sam
Updated on 30-Jul-2019 22:30:21

2K+ Views

>> Binary Right ShiftThe left operand value is moved right by the number of bits specified by the right operand.>>> Shift right zero fillThe left operand value is moved right by the number of bits specified by the right operand and shifted values are filled up with zeros.

Is StringBuffer final in Java?

Anjana
Updated on 30-Jul-2019 22:30:21

791 Views

Yes, StringBuffer class is final Java. We cannot override this class.

Why we do not import a package while we use any string function?

Sai Nath
Updated on 30-Jul-2019 22:30:21

996 Views

The String class belongs to the java.lang package. This is the default package of the Java language therefore it is not mandatory to import it to use its classes.

Advertisements