Chandu yadav has Published 1163 Articles

How can I use MySQL OCTET_LENGTH() function to count the number of characters stored in a data column?

Chandu yadav

Chandu yadav

Updated on 07-Feb-2020 06:39:43

57 Views

We need to pass the column name as the argument of OCTET_LENGTH() function to count the number of characters stored in a data column. It displays the number of characters when referenced in SELECT clause. It can also be used as comparison value to decide whether or not the row ... Read More

How MySQL SUM() function evaluates if it got the column, having character data type, as its argument?

Chandu yadav

Chandu yadav

Updated on 07-Feb-2020 05:43:43

97 Views

MySQL SUM() function will return 0, rather than NULL, along with a warning on getting the character type column as its argument. Following example using data from table named ‘Social’ will illustrate it −Examplemysql> Select * from Social; +------+-------+ | Id   | Name  | +------+-------+ | 100  | ... Read More

What MySQL INSERT() function returns if the number of characters to be removed exceeds the number of characters available in original string?

Chandu yadav

Chandu yadav

Updated on 06-Feb-2020 06:20:16

49 Views

In case if the number of characters to be removed exceeds the number of characters available in original string then MySQL INSERT() function will continue to remove the characters until the end of the original string.Examplemysql> Select INSERT('myteststring', 3, 15, 'original'); +----------------------------------------+ | INSERT('myteststring', 3, 15, 'original') | +----------------------------------------+ ... Read More

What MySQL returns on running the INSERT INTO statement without giving the column name and values both?

Chandu yadav

Chandu yadav

Updated on 05-Feb-2020 10:08:58

128 Views

When we run the INSERT INTO statement without giving the columns name/s and values both then MySQL will store NULL as the value of the column/s of table. Consider the example given below in which we have created a table ‘Student’ with the following query −mysql> Create table Student(RollNO INT, ... Read More

How can we use MySQL INSTR() function with WHERE clause?

Chandu yadav

Chandu yadav

Updated on 04-Feb-2020 06:10:29

702 Views

When we use INSTR() function with MySQL WHERE clause, we need to provide column name of the table as the first argument and the substring as second argument along with a comparison operator. Following is an example using ‘Student’ table to demonstrate it −ExampleSuppose we have the following values in ... Read More

Usage of CSS list-style-position property

Chandu yadav

Chandu yadav

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

92 Views

The list-style-position property indicates whether the marker should appear inside or outside of the box containing the bullet points. If the text goes onto a second line, the text will wrap underneath the marker, for the value inside.Example If the text goes onto a second line, the text will be aligned with ... Read More

Set image for bullet style with CSS

Chandu yadav

Chandu yadav

Updated on 03-Feb-2020 07:09:41

401 Views

The list-style-image allows you to specify an image so that you can use your own bullet style.ExampleYou can try to run the following code to set an image for bullet with CSS                            Football          Cricket          

Set the top margin of an element with CSS

Chandu yadav

Chandu yadav

Updated on 03-Feb-2020 06:58:49

105 Views

The margin-top specifies the top margin of an element. It can have a value in length, % or auto. You can try to run the following code to set the top margin:Example                            This is a paragraph with ... Read More

Usage of border-bottom-width property in CSS

Chandu yadav

Chandu yadav

Updated on 03-Feb-2020 06:17:24

62 Views

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

How can I manage the start position of searching in MySQL LOCATE() function?

Chandu yadav

Chandu yadav

Updated on 03-Feb-2020 06:12:45

88 Views

As we know that by default searching in LOCATE() function starts from beginning. We can manage the start position by giving an argument to specify the position from which we want to start the search in string. Following example will demonstrate it −Examplemysql> Select LOCATE('good', 'Ram is a good boy. ... Read More

Advertisements