Alankritha Ammu has Published 47 Articles

What MySQL returns if I provide a non-hexadecimal number as an argument to UNHEX() function?

Alankritha Ammu

Alankritha Ammu

Updated on 20-Jun-2020 11:58:11

86 Views

MySQL returns NULL if we provide any non-hexadecimal number as an argument to UNHEX() function. Following example will demonstrate it.Examplemysql> Select UNHEX('ANK96598'); +-------------------+ | UNHEX('ANK96598') | +-------------------+ | NULL              | +-------------------+ 1 row in set (0.00 sec)As we know that the valid hexadecimal digits ... Read More

What is the proper structure for searching within MySQL using SOUNDEX()?

Alankritha Ammu

Alankritha Ammu

Updated on 20-Jun-2020 11:04:34

84 Views

Basically, SOUNDEX() function is used to return the Soundex, a phonetic algorithm for indexing names after English pronunciation of sound, a string of a string. The proper structure for searching within MySQL using SOUNDEX() is as follows −SOUNDEX(Str)Here, Str is the string whose SOUNDEX string is to be retrieved.Examplemysql> Select ... Read More

What would be the output of MySQL ELT() function if the index number, provided as an argument, is not an integer?

Alankritha Ammu

Alankritha Ammu

Updated on 20-Jun-2020 08:56:38

63 Views

As we know the 1st argument of ELT() function must be an integer value but when we provide index number which is not an integer the MySQL ELT() function returns NULL with a warning.Examplemysql> select ELT('one', 'Ram, is, good, boy')As Result; +--------+ | Result | +--------+ | NULL   | ... Read More

How can we retrieve the length of a specified string in MySQL?

Alankritha Ammu

Alankritha Ammu

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

55 Views

CHAR_LENGTH() or CHARACTER_LENGTH() string functions in MySQL are used to retrieve the length of a specified string. This function will simply count the number of characters and ignores whether the characters are of single-byte or multi-byte.Examplemysql> Select CHAR_LENGTH('New Delhi'); +--------------------------+ | CHAR_LENGTH('New Delhi') | +--------------------------+ | 9       ... Read More

How Groups function can be used in MySQL SELECT clause?

Alankritha Ammu

Alankritha Ammu

Updated on 20-Jun-2020 06:29:28

76 Views

As we know that group function operates on the sets of value that is why if group functions will be used in SELECT clause then they will be used on the rows that meet the query selection criteria and the output of group functions will be returned as the output ... Read More

What is an exclamation “!” operator in JavaScript?

Alankritha Ammu

Alankritha Ammu

Updated on 15-Jun-2020 07:12:10

1K+ Views

The exclamation operator is to perform negation on an expression.ExampleYou can try to run the following code to learn how to implement exclamation(!) operator in JavaScript −Live Demo           JavaScript Boolean                        var answer = true;          document.write(answer);          document.write(""+!answer);          

How to convert a boolean value to string value in JavaScript?

Alankritha Ammu

Alankritha Ammu

Updated on 15-Jun-2020 06:58:38

15K+ Views

To convert a Boolean value to string value in JavaScript, use the toString() method. This method returns a string of either "true" or "false" depending upon the value of the object.ExampleYou can try to run the following code to convert a boolean value to string value −Live Demo     ... Read More

What is the difference between substr() and substring() in JavaScript?

Alankritha Ammu

Alankritha Ammu

Updated on 15-Jun-2020 06:46:04

256 Views

The examples given above have the same output, but yes the method differs, with that the parameters too.The substring() method the second parameter is the index to stop the search, whereas the second parameter of substr() is the maximum length to return.ExampleLet’s see an example for substr() method in JavaScript ... Read More

When Java runs faster than C++?

Alankritha Ammu

Alankritha Ammu

Updated on 13-Jun-2020 14:03:12

65 Views

Following are the areas where Java has proved itself faster than C++.Memory allocation/deallocation: Memory allocation/deallocation is much faster and it is often faster to create a new big array instead of using the cached one.Object instantiation: Memory management done by GC of Java attributes faster object related operations on Java ... Read More

How to set JAVA_HOME for Java in Windows?

Alankritha Ammu

Alankritha Ammu

Updated on 13-Jun-2020 12:49:30

586 Views

Assuming you have installed Java in c:\Program Files\java\jdk directory −Right-click on 'My Computer' and select 'Properties'.Click the 'Environment variables' button under the 'Advanced' tab.Now, add the 'JAVA_HOME' variable and set the path to the c:\Program Files\java\jdk'.

Advertisements