Akshaya Akki has Published 54 Articles

How to return the day of the week in the specified date according to universal time?

Akshaya Akki

Akshaya Akki

Updated on 23-Jun-2020 08:13:52

JavaScript date getUTCDay() method returns the day of the week in the specified date according to universal time. The value returned by getUTCDay() is an integer corresponding to the day of the week: 0 for Sunday, 1 for Monday, 2 for Tuesday, and so on.ExampleYou can try to run the following ... Read More

What is the role of source RegExp property in JavaScript?

Akshaya Akki

Akshaya Akki

Updated on 23-Jun-2020 08:02:06

The source RegExp property in JavaScript is a read-only string property of RegExp objects. It contains the text of the RegExp pattern. This text does not include the delimiting slashes used in regular-expression literals, and it does not include the "g", "i", and "m" attributes.ExampleYou can try to run the ... Read More

How can we drop a MySQL view from the database?

Akshaya Akki

Akshaya Akki

Updated on 22-Jun-2020 13:43:50

With the help of DROP VIEW statement, we can drop a MySQL view from the database. Its syntax would be as follows −SyntaxDROP VIEW [IF EXISTS] view_name;Here view_name is the name of the view which we want to delete from the database.ExampleSuppose if we want to drop a view named ... Read More

How can we create a MySQL one-time event that executes after some specified time interval?

Akshaya Akki

Akshaya Akki

Updated on 22-Jun-2020 12:28:53

As we know a one-time event means the events that will be executed only once on a particular schedule. To illustrate the creation of such kind of events we are using the following example in which we are creating an event which will execute after some specified time interval −Examplemysql> ... Read More

How does MySQL evaluate the expression if the arguments are not equal in NULLIF()?

Akshaya Akki

Akshaya Akki

Updated on 22-Jun-2020 07:28:19

As we know that MySQL NULLIF() control flow function will return the first argument both the arguments are not the same. The first argument is returned because MySQL evaluates the first argument twice if both of the arguments are not the same.Examplemysql> Select NULLIF('Tutorialspoint', 'MySQL'); +----------------------------------+ | NULLIF('Tutorialspoint', 'MySQL') | ... Read More

What MYSQL INTERVAL() function returns if there is no bigger number in the list of arguments than the number at first argument?

Akshaya Akki

Akshaya Akki

Updated on 22-Jun-2020 06:43:37

In this case, MySQL INTERVAL() function returns the index number of the last number in argument list plus 1. In other words, the last index number in the list plus 1 would be returned by this function. Following example will demonstrate it −mysql> Select INTERVAL(50, 20, 32, 38, 40); +--------------------------+ ... Read More

What is the use of MySQL CHAR() function?

Akshaya Akki

Akshaya Akki

Updated on 22-Jun-2020 05:49:59

In MySQL, is it possible to get the character value of the given integer value based on the ASCII table?MySQL CHAR() function is used to return the character value of the given integer value according to the ASCII table. Its syntax is as follows −SyntaxCHAR(N, …[USING charset_name])Here N, are the ... Read More

What is the benefit of using MySQL SUM() function with GROUP BY clause?

Akshaya Akki

Akshaya Akki

Updated on 22-Jun-2020 05:08:37

When we use MySQL SUM() function with GROUP BY Clause the SUM() function evaluates the sum for every group specified in the GROUP BY clause. The benefit of using SUM() with GROUP BY clause is that we can easily find the total of a particular group. To understand the above ... Read More

How can we remove all the prefixes or suffixes from a given string in MySQL?

Akshaya Akki

Akshaya Akki

Updated on 20-Jun-2020 11:48:45

MySQL TRIM() function is used to remove all the suffixes or prefixes or both from the string. The working of TRIM() function can be understood with the help of its syntax −SyntaxTRIM([{BOTH | LEADING | TRAILING} [str_to_remove] FROM] string)Here,  the argument BOTH means the prefixes from both left and right ... Read More

What happens with the output of MySQL EXPORT_SET() function if I will skip both 4th and 5th argument i.e. separator and number of bits?

Akshaya Akki

Akshaya Akki

Updated on 20-Jun-2020 09:00:18

As we know that the default value of the fifth argument i.e. number of bits is 64, hence if we will not specify any value on fifth argument them MySQL will check the bits up to 64 bits and produce the result. Whereas, on skipping the fourth argument i.e. separator, ... Read More

Advertisements