Kumar Varma has Published 110 Articles

How to set the minimum height of an element with JavaScript?

Kumar Varma

Kumar Varma

Updated on 23-Jun-2020 13:29:03

448 Views

Use the minHeight property in JavaScript to set the maximum height. You can try to run the following code to set the minimum height of an element with JavaScript −ExampleLive Demo                    #box {             ... Read More

How to preserve the readability of text when font fallback occurs with JavaScript?

Kumar Varma

Kumar Varma

Updated on 23-Jun-2020 13:06:14

98 Views

Use the fontSizeAdjust property to preserve the readability of text. It sets the aspect value of a font i.e. the difference between the size of lowercase and uppercase letters.ExampleYou can try to run the following code to preserve the readability of text when font fallback occurs with JavaScript −Live Demo ... Read More

How to return the id of the first image in a document with JavaScript?

Kumar Varma

Kumar Varma

Updated on 23-Jun-2020 08:11:36

317 Views

To return the id of the first image, use the images property in JavaScript.ExampleYou can try to run the following code to return the id of the first image in a document −Live Demo                         ... Read More

What are the different types of MySQL GENERATED COLUMNS?

Kumar Varma

Kumar Varma

Updated on 22-Jun-2020 14:29:07

74 Views

We have two types of MYSQL generated columns as follows −VIRTUAL GENERATED COLUMNAs the name suggests, this kind of generated column will not take any disk space. It can be generated with or without using the keyword ‘virtual’. To understand we are illustrating it in the following example −Examplemysql> Create ... Read More

How can we create a MySQL view by selecting some range of values from a base table?

Kumar Varma

Kumar Varma

Updated on 22-Jun-2020 14:00:50

106 Views

As we know that MySQL BETWEEN operator can be used to select values from some range of values. We can use BETWEEN operator along with views to select some range of values from the base table. To understand this concept we are using the base table ‘student_info’ having the following ... Read More

How can we modify the definition of a MySQL view without dropping it?

Kumar Varma

Kumar Varma

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

98 Views

With the help of ALTER VIEW statement, we can modify the definition of MySQL view. In this case, we do not need to drop it. The syntax would be as follows −SyntaxALTER VIEW view_name AS SELECT column1, column2… FROM table WHERE conditions;ExampleTo illustrate it we are modifying the definition of ... Read More

How can MySQL handle the errors during trigger execution?

Kumar Varma

Kumar Varma

Updated on 22-Jun-2020 13:00:16

778 Views

Suppose if an error occurs during trigger execution then MySQL can handle it as follows −If a BEFORE trigger fails, the operation on the corresponding row is not performed.A BEFORE trigger is activated by the attempt to insert or modify the row, regardless of whether the attempt subsequently succeeds.An AFTER ... Read More

How MySQL manage the behavior of a transaction?

Kumar Varma

Kumar Varma

Updated on 22-Jun-2020 11:13:00

44 Views

MySQL can manage the behavior of a transaction with the help of the following two modes −Autocommit OnIt is the default mode. In this mode, each MySQL statement (within a transaction or not) is considered as a complete transaction and committed by default when it finishes. It can be started ... Read More

What MySQL returns if the first argument of INTERVAL() function is NULL?

Kumar Varma

Kumar Varma

Updated on 22-Jun-2020 06:46:02

79 Views

MySQL returns -1 as output if the first argument of INTERVAL() function is NULL. Following example will demonstrate it −mysql> Select INTERVAL(NULL, 20, 32, 38, 40, 50, 55); +--------------------------------------+ | INTERVAL(NULL, 20, 32, 38, 40, 50, 55)     | +--------------------------------------+ | -1               ... Read More

Write down the MySQL query which shows equality condition?

Kumar Varma

Kumar Varma

Updated on 22-Jun-2020 06:24:12

59 Views

The binary equality operators compare their operands for strict equality or inequality. In MySQL, the equal-to-operator (=) returns 1 if both the operands have the same value otherwise returns 0. Following MySQL query show an equality condition −mysql> Select tender_value From estimated_cost WHERE id = 3;The above query shows an ... Read More

Advertisements