Sharon Christine has Published 436 Articles

What is availWidth property in JavaScript?

Sharon Christine

Sharon Christine

Updated on 23-Jun-2020 07:54:22

61 Views

Use the screen.availWidth property to return the width of the user’s screen. The result will be in pixels and the Taskbar feature won’t be included.ExampleYou can try to run the following code to learn how to work with the screen.availWidth property in JavaScript −Live Demo         ... Read More

With JavaScript DOM delete rows in a table?

Sharon Christine

Sharon Christine

Updated on 23-Jun-2020 07:33:28

5K+ Views

To delete rows in a table in JavaScript, use the DOM deleteRow() method.ExampleYou can try to run the following code to learn how to delete rows in a table. The code deletes rows one at a time −Live Demo                 function ... Read More

How can we alter table to add MySQL stored GENERATED COLUMNS?

Sharon Christine

Sharon Christine

Updated on 22-Jun-2020 14:35:06

119 Views

For adding MySQL stored GENERATED COLUMNS in a table, we can use the same syntax as adding a column just adding “AS(expression)” after the data type. Its syntax would be as follows −SyntaxALTER TABLE table_name ADD COLUMN column_name AS(expression)STORED;Examplemysql> ALTER TABLE employee_data_stored ADD COLUMN FULLName Varchar(200) AS (CONCAT_WS(" ", 'First_name', ... Read More

How can we create a MySQL view with a subquery?

Sharon Christine

Sharon Christine

Updated on 22-Jun-2020 13:51:28

1K+ Views

To illustrate the making of MySQL view with subquery we are using the following data from the table ‘Cars’ −mysql> select * from cars; +------+--------------+---------+ | ID   | Name         | Price   | +------+--------------+---------+ |    1 | Nexa         | 750000 ... Read More

What are the different status variables in MySQL which provide us the countsof event-related operations?

Sharon Christine

Sharon Christine

Updated on 22-Jun-2020 12:49:04

40 Views

Followings are the status variables in MYSQL which provide us the counts of event-related operations −Com_create_event It provides us the number of CREATE EVENT statements executed since the last server restart.Com_alter_event − It provides us the number of ALTER EVENT statements executed since the last server restart.Com_drop_event − It provides ... Read More

How can we get the metadata of triggers?

Sharon Christine

Sharon Christine

Updated on 22-Jun-2020 11:46:12

109 Views

It can be done with the help of the INFORMATION_SCHEMA database. Following statement will give us the metadata of triggers −mysql> Select trigger_schema, trigger_name, action_statement     -> from information_schema.triggers\G *************************** 1. row ***************************   trigger_schema: query     trigger_name: trigger_before_delete_sample action_statement: BEGIN SET @count = if (@count IS NULL, ... Read More

Which statement, other than START TRANSACTION, is used for starting a transaction?

Sharon Christine

Sharon Christine

Updated on 22-Jun-2020 11:10:21

128 Views

We can also use the BEGIN statement to start a new transaction. It is the same as the START TRANSACTION statement.Examplemysql> BEGIN; Query OK, 0 rows affected (0.00 sec) mysql> INSERT INTO Marks Values(1, 'Aarav', 'History', 40); Query OK, 1 row affected (0.00 sec) mysql> INSERT INTO Marks ... Read More

How can MySQL REPLACE() function be used with WHERE clause?

Sharon Christine

Sharon Christine

Updated on 22-Jun-2020 06:25:31

2K+ Views

As we know that WHERE clause is used to put condition/s in MySQL query and MySQL returns result set based on those conditions. Similarly when we use REPLACE() function with WHERE clause, the result set will depend upon the conditions provided. Following is an example by using data from the ... Read More

What is MySQL NULL-safe equal operator and how it is different from comparison operator?

Sharon Christine

Sharon Christine

Updated on 22-Jun-2020 06:21:17

249 Views

MySQL NULL-safe equal operator, equivalent to standard SQL IS NOT DISTINCT FROM operator, performs an equality comparison like = operator. Its symbol is . It performs differently from the comparison operators in the case when we have NULL as both the operands. Consider the following examples to understand NULL-safe operator ... Read More

In MySQL, what is Bit-field notation and how it can be used to write bit-field value?

Sharon Christine

Sharon Christine

Updated on 22-Jun-2020 05:41:38

264 Views

Bit-field notation is the notation with the help of which we can write bit-field values. The syntax of Bit-field notation is as follows −Syntaxb’value’   OR 0bvalueHere, the value is a binary value written by using zeros and ones.The mainly Bit-filed notation is convenient for specifying values to be assigned ... Read More

Advertisements