Alankritha Ammu has Published 60 Answers

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

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

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

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

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

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

How to delete a getter using the delete operator in JavaScript?

Alankritha Ammu

Alankritha Ammu

Updated on 16-Jun-2020 08:14:17

To delete a getter using the delete operator, use the delete keyword. Here’s how you can delete −delete obj.nameExampleYou can try to run the following code to learn how to delete a getterLive Demo                    var department = {     ... Read More

What is an exclamation “!” operator in JavaScript?

Alankritha Ammu

Alankritha Ammu

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

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

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

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

Java if statement example

Alankritha Ammu

Alankritha Ammu

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

Flow DiagramIf the boolean expression evaluates to true, then the if a block of code will be executed, otherwise else block of code will be executed.Example Live Demopublic class Test {    public static void main(String args[]) {       int x = 30;       if( x < ... Read More

Advertisements