Usharani has Published 88 Articles

While using the ROLLUP modifier, is it possible to use a MySQL ORDER BY clause to sort the result?

usharani

usharani

Updated on 22-Jun-2020 11:11:44

Actually ROLLUP and ORDER BY are mutually exclusive in MySQL hence it is not a good practice to use both of them in a query. But still, if we use ROLLUP in ORDER BY then the main disadvantage is that the summary rows would get sorted along with the rows ... Read More

How is it possible to enter multiple MySQL statements on a single line?

usharani

usharani

Updated on 22-Jun-2020 08:30:51

As we know that a query consists of MySQL statements followed by a semicolon. We can enter multiple MySQL statements, separated by semicolons, on a single line. Consider the following example −mysql> Select * from Student; Select * from Student ORDER BY Name; +--------+--------+--------+ | Name   | RollNo | ... Read More

CSS overflow: hidden

usharani

usharani

Updated on 22-Jun-2020 08:01:39

In the CSS overflow property with value hidden, the overflow is clipped. The content hides. You can try to run the following code to implement CSS overflow: hidden property −ExampleLive Demo                    div {             ... Read More

What are recursive stored procedures and why MySQL limits the recursion?

usharani

usharani

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

A stored procedure is called recursive if it calls itself. Basically, this concept is called recursion. MySQL limits the recursion so the errors will be less rigorous. We can check this limit with the help of the following query −mysql> Show variables LIKE '%recur%'; +------------------------+-------+ | Variable_name       ... Read More

How can user variables be used in MySQL stored procedure?

usharani

usharani

Updated on 22-Jun-2020 05:54:47

In MySQL stored procedure, user variables are referenced with an ampersand i.e. @, prefixed to the user variable names. For example, @A, @B, etc. are user variables. To demonstrate it, we are creating the following procedure −mysql> DELIMITER // ; mysql> CREATE PROCEDURE Proc_Uservariables()    -> BEGIN    -> SET ... Read More

How to get the MySQL interactive output format in batch mode also?

usharani

usharani

Updated on 22-Jun-2020 04:59:20

We can get the MySQL output format in batch mode with the help of –t option. For example, after running the same query in batch mode with –t option we will get the output like interactive format.ExampleC:\Program Files\MySQL\bin>mysql -u root -p gaurav < hh.sql -t Enter password: *****Output+------+ | id ... Read More

Style all elements with a valid value with CSS

usharani

usharani

Updated on 21-Jun-2020 07:26:39

Use the CSS : valid selector to style all elements with a valid value .ExampleYou can try to run the following code to implement the :valid Selector:Live Demo                    input:valid {             background: red;   ... Read More

Determine how overflowed content that is not displayed is signaled to users with CSS

usharani

usharani

Updated on 20-Jun-2020 13:45:08

The text-overflow property is used to determine how overflowed content that is not displayed is signaled to users with CSS.ExampleYou can try to run the following code to implement a text-overflow property in CSS:Live Demo                    p.text1 {       ... Read More

How can INTERSECTION between tables be implemented with the help of MySQL joins?

usharani

usharani

Updated on 20-Jun-2020 11:16:54

Actually, INTERSECTION is just an inner join on all columns. We are taking a simple example of two tables, having the data as follows −mysql> Select * from value1; +------+------+ | i    | j    | +------+------+ | 1    | 1    | | 2    | 2 ... Read More

How can we import the text file, having some line prefixes, into MySQL table?

usharani

usharani

Updated on 20-Jun-2020 09:17:27

Suppose if we have a line prefix in the text file then with the help of using ‘LINES STARTING BY’ option we can ignore that prefix and import correct data into MySQL table. It can be understood with the help of the following example −ExampleSuppose we are using ‘VALUE’ as ... Read More

Advertisements