Jai Janardhan has Published 70 Articles

How to create a table caption with JavaScript DOM?

Jai Janardhan

Jai Janardhan

Updated on 23-Jun-2020 07:32:58

377 Views

To create a table caption, use the DOM createCaption() method.ExampleYou can try to run the following code to learn how to create table caption −Live Demo                    function captionFunc(x) {             document.getElementById(x).createCaption().innerHTML = "Demo Caption";          }                                           One             Two                                 Three             Four                                 Five             Six                                          

How can we get the definition of a MySQL view as we can get the definition of a MySQL table?

Jai Janardhan

Jai Janardhan

Updated on 22-Jun-2020 13:42:31

239 Views

As we know that views are a type of virtual tables and are the composition of tables too hence we can use the same query to get the definition of a view which we use to get the definition of a table. In other words, we can use SHOW CREATE ... Read More

What will happen to the current MySQL transaction if a START TRANSACTION command is executed in the middle of that current transaction?

Jai Janardhan

Jai Janardhan

Updated on 22-Jun-2020 11:29:39

95 Views

The current transaction will be committed and ended if START TRANSACTION is executed in the middle of a current transaction. All the database changes made in the current transaction will be made permanent. This is called an implicit commit by a START TRANSACTION command.ExampleSuppose we have the following values in ... Read More

How can I return the values of columns from MySQL table as a set of values?

Jai Janardhan

Jai Janardhan

Updated on 22-Jun-2020 07:46:20

151 Views

With the help of MySQL MAKE_SET() function, we can return the values of columns from MySQL table as a set of values. To understand it, we are taking the example of Student_Name table which has the following data −mysql> Select * from Student_Name; +---------+-------+---------+ | FName   | Mname | ... Read More

What is the use of MySQL IFNULL() control flow function?

Jai Janardhan

Jai Janardhan

Updated on 22-Jun-2020 06:59:50

100 Views

MySQL IFNULL() control flow function will return the first argument if it is not NULL otherwise it returns the second argument.SyntaxIFNULL(expression1, expression2)Here if expression1 is not NULL then IFNULL() will return expression1 otherwise expression2. It will return NULL if both of the arguments are NULL. Following example will exhibit this ... Read More

What MySQL COUNT() function returns if there are some NULL values stored in a column also?

Jai Janardhan

Jai Janardhan

Updated on 22-Jun-2020 05:13:36

84 Views

When we use MySQL COUNT() function to count the values stored in a column which also stored some NULL values then MySQL ignores the NULL and returns the result for only non-NULL values. To understand it, we are using the data, as follows, from table ‘Employee’ −mysql> Select * from ... Read More

How MySQL FIELD() and ELT() functions are complements of each other?

Jai Janardhan

Jai Janardhan

Updated on 20-Jun-2020 09:04:45

86 Views

On the basis of the working of both the functions, we can say that both are the complement of each other. Actually, as we know that FIELD() function, on providing a string as an argument, returns the index number of the string from string list and ELT() function, on providing ... Read More

How wildcard characters can be used with MySQL CONCAT() function?

Jai Janardhan

Jai Janardhan

Updated on 20-Jun-2020 08:26:10

441 Views

As we know that wildcards are characters that help search data matching complex criteria. Wildcards are used in conjunction with LIKE comparison operator or NOT LIKE comparison operator. MySQL allows us to match the data, from the output of CONCAT() function, with the help of wildcard and comparison operators LIKE ... Read More

How can we update columns values on multiple rows with a single MySQL UPDATE statement?

Jai Janardhan

Jai Janardhan

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

4K+ Views

Column values on multiple rows can be updated in a single UPDATE statement if the condition specified in WHERE clause matches multiple rows. In this case, the SET clause will be applied to all the matched rows.ExampleSuppose we have a table ‘tender’ as follows −mysql> Select * from tender; ... Read More

How can we insert values into a table with the help of MySQL self-computed output?

Jai Janardhan

Jai Janardhan

Updated on 20-Jun-2020 06:15:32

77 Views

We can insert the values into a table with the help of the self-computed output returned by MySQL. In this case, we do not need to use dummy ‘dual’ table. The syntax can be as follows −INSERT INTO table_name(column1, column2, column3, …) Select value1, value2, value3, …;ExampleIn the example below, ... Read More

Advertisements