Mkotla has Published 100 Articles

How can I combine the built-in-commands (g and G), used for executing a MySQL statement, with each other?

mkotla

mkotla

Updated on 22-Jun-2020 11:33:43

48 Views

As we know that built-in-commands (\G and \g) send the command to MySQL server for execution and both of them have the different format of the result set. For combining them and getting the result without error, we need to write two queries, one query with \G and other with ... Read More

What would be the output if we use a NULL value in an arithmetic expression?

mkotla

mkotla

Updated on 22-Jun-2020 10:58:08

734 Views

As we know that a NULL is no value and it is not the same as zero. MySQL represents a database column as NULL if it does not contain any data. Now, if we will use NULL in any arithmetic expression then the result will be NULL also.Examplemysql> Select 65/NULL, ... Read More

What kind of information is displayed by MySQL DESCRIBE statement?

mkotla

mkotla

Updated on 22-Jun-2020 08:26:00

46 Views

The DESCRIBE statement gives information about MySQL table’s structure.ExampleConsider the constructing of the following table name ‘Employee’ with Create Table statement as follows −mysql> Create table Employee(ID INT NOT NULL PRIMARY KEY AUTO_INCREMENT, Name Varchar(20)); Query OK, 0 rows affected (0.20 sec)Now with the help of ‘DESCRIBE Employee‘ statement, we ... Read More

How can we perform ROLLBACK transactions inside a MySQL stored procedure?

mkotla

mkotla

Updated on 22-Jun-2020 07:26:52

2K+ Views

As we know that ROLLBACK will revert any changes made to the database after the transaction has been started. To perform the ROLLBACK in MySQL stored procedure we must have to declare EXIT handler. We can use a handler for either sqlexception or SQL warnings. It can be understood with the help of ... Read More

How can we perform COMMIT transactions inside MySQL stored procedure?

mkotla

mkotla

Updated on 22-Jun-2020 07:02:12

552 Views

As we know the START transaction will start the transaction and COMMIT is used to made any changes made after starting the transaction. In the following example, we have created a stored procedure with COMMIT along with START transaction which will insert a new record and commit changes in table ... Read More

Add different styles to hyperlinks using CSS

mkotla

mkotla

Updated on 22-Jun-2020 06:00:28

207 Views

To set different styles to hyperlinks, such as font-size, background color, etc, you can try to run the following code:ExampleLive Demo                    a.first:link {color:#ff0000;}          a.first:visited {color:#0000ff;}          a.first:hover {color:#ffcc00;}         ... Read More

How can we see the list, along with other information, stored procedures in a particular MySQL database?

mkotla

mkotla

Updated on 22-Jun-2020 05:14:31

76 Views

We can see only the list of stored procedures in a particular MySQL database by the following query −mysql> SHOW PROCEDURE STATUS WHERE db = 'query'\G *************************** 1. row ***************************                   Db: query                 Name: ... Read More

Role of CSS :nth-last-of-type(n) Selector

mkotla

mkotla

Updated on 21-Jun-2020 08:48:30

92 Views

Use the CSS :nth-last-of-type(n) selector to select every element that is the second element of its parent, counting from the last child.ExampleYou can try to run the following code to implement the :nth-last-of-type(n) selector:Live Demo                    p:nth-last-of-type(2) { ... Read More

Example of key frames with left animation using CSS3

mkotla

mkotla

Updated on 21-Jun-2020 05:26:43

77 Views

The following example shows height, width, color, name, and duration of animation with keyframes syntax −ExampleLive Demo                    h1 {             -moz-animation-duration: 3s;             -webkit-animation-duration: 3s;           ... Read More

How can we change MySQL user password by using the ALTER USER statement?

mkotla

mkotla

Updated on 20-Jun-2020 11:41:28

252 Views

We can also use ALTER USER statement along with IDENTIFIED BY clause to change MySQL user password. Its syntax would be as possible −SyntaxALTER USER user_name@host_name IDENTIFIED BY ‘new_password’Here,  New_password would be new password we want to set for MySQL userUser_name is the name of a current user.Host_name is the ... Read More

Advertisements