Ankith Reddy has Published 1070 Articles

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

Ankith Reddy

Ankith Reddy

Updated on 07-Feb-2020 07:15:41

74 Views

MySQL returns NULL if the argument of QUOTE() function is NULL.Examplemysql> Select QUOTE(NULL); +-------------+ | QUOTE(NULL) | +-------------+ | NULL         +-------------+ 1 row in set (0.00 sec) mysql> Select Name, QUOTE(NULL) from student where id = 1; +--------+-------------+ | Name   | QUOTE(NULL) | +--------+-------------+ | Gaurav | NULL        | +--------+-------------+ 1 row in set (0.08 sec)

In MySQL, how can we check whether a string of a specified pattern is not present within another string?

Ankith Reddy

Ankith Reddy

Updated on 07-Feb-2020 06:45:36

68 Views

We can check whether a string of specified pattern is not present within another string by using NOT LIKE operator along with wildcard characters.SyntaxNOT LIKE specific_patternSpecific_pattern is the pattern of string we do not want to find out within another string.ExampleSuppose we have a table named ‘student’ having names of ... Read More

How can we use LPAD() or RPAD() functions with the values in the column of a MySQL table?

Ankith Reddy

Ankith Reddy

Updated on 06-Feb-2020 06:53:27

584 Views

For using LPAD() or RPAD() functions with the column values we need to specify the column name as the first argument of these functions. Following the example from ‘Student’ table will make it clearer −Examplemysql> Select Name, LPAD(Name, 10, '*') from student; +---------+-------------------+ | Name    | LPAD(Name, 10, ... Read More

What is the significance of using multiple columns in MySQL GROUP BY clause?

Ankith Reddy

Ankith Reddy

Updated on 06-Feb-2020 06:45:51

152 Views

By specifying multiple columns in GROUP BY clause we can split the result set into smaller groups. The more columns specified in GROUP BY clause, the smaller the groups will be.Examplemysql> Select designation, YEAR(Doj), count(*) from employees GROUP BY designation, YEAR(DoJ); +-------------+-----------+----------+ | designation | YEAR(Doj) | count(*) | ... Read More

Why we cannot use comparison operator(=) for getting the rows with NULL from a table?

Ankith Reddy

Ankith Reddy

Updated on 06-Feb-2020 06:41:12

42 Views

We cannot use = (comparison operator) because we know that NULL is not a value. If we want to get the rows with NULL from a table then we need to use IS NULL operator in MySQL query. Following example using the data from ‘employee’ table will exhibit it −Examplemysql> ... Read More

How it is possible in MySQL to find a string of specified pattern within another string?

Ankith Reddy

Ankith Reddy

Updated on 04-Feb-2020 06:00:45

71 Views

We can find a string of specified pattern within another string by using LIKE operator along with WILDCARDS.SyntaxLIKE specific_patternSpecific_pattern is the pattern of string we want to find out within another string.ExampleSuppose we have a table named ‘student’ having names of the students and we want to get the details ... Read More

Do we have any lower and upper limit of base in MySQL CONV() function? What happens if out of limit base is provided in CONV() function?

Ankith Reddy

Ankith Reddy

Updated on 04-Feb-2020 05:56:40

61 Views

The base must be greater than 2 and less than 36 i.e. the lower limit of a base is 2 and the upper limit is 36. It is applied to both from_base and to_base values. If in case we provide out of limit values of the base then MySQL returns ... Read More

Set marker outside of the box containing the bullet points with CSS

Ankith Reddy

Ankith Reddy

Updated on 03-Feb-2020 07:32:20

194 Views

To set marker outside of the box containing the bullet points, use the list-style-position property with the value outside.Example The outside value means if the text goes onto a second line, the text will be aligned with the start of the first line                     ... Read More

How to indicate whether the marker should appear inside or outside of the box containing the bullet points with CSS?

Ankith Reddy

Ankith Reddy

Updated on 03-Feb-2020 07:06:03

274 Views

The list-style-position property indicates whether the marker should appear inside or outside of the box containing the bullet points. It can have one the two valuesValueDescriptionnoneNAinsideIf the text goes onto a second line, the text will wrap underneath the marker. It will also appear indented to where the text would ... Read More

Change the style of bottom border with CSS

Ankith Reddy

Ankith Reddy

Updated on 03-Feb-2020 06:37:53

106 Views

The border-bottom-style property changes the style of bottom border. You can try to run the following code to implement the border-bottom-style property:Example                            This is demo content          

Advertisements