Giri Raju has Published 114 Answers

How to write a MySQL stored function that inserts values in a table?

Giri Raju

Giri Raju

Updated on 13-Feb-2020 07:00:24

As we know that function is best used when we want to return a result. Hence, when we will create stored functions for manipulating tables like to Insert or Update values then it would be more or less like stored procedures.ExampleIn the following example we are creating a stored function ... Read More

How can I restore a database dumped by mysqldump?

Giri Raju

Giri Raju

Updated on 07-Feb-2020 06:37:34

Suppose if we have dumped the whole database and now want to restore it then we can do it with the following example −C:\mysql\bin>mysql -u root query < tutorials.sqlWith the help of above query, we are restoring the dumped database named ‘tutorials’, in the file tutorials.sql, into other database named ... Read More

How can we use the MySQL reserved words as an identifier?

Giri Raju

Giri Raju

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

We must have to use quotes with reserved words to use them as an identifier. The quotes can be single or double depends upon ANSI_QUOTES SQL mode.If this mode is disabled then the identifier quote character is the backtick (“`”). Consider the following example in which we created a table ... Read More

Font size adjust of an element with CSS

Giri Raju

Giri Raju

Updated on 30-Jan-2020 10:35:27

This property enables you to adjust the x-height to make fonts more legible. Possible value could be any number.Example<html>    <head>    </head>    <body>       <p style = "font-size-adjust:0.91;">          Asia is a continent.       </p>    </body> </html>Read More

Usage of font-style property in CSS

Giri Raju

Giri Raju

Updated on 30-Jan-2020 10:18:40

The font-style property is used to make a font italic or oblique. You can try to run the following code to set the font-style property:<html>    <head>    </head>    <body>       <p style = "font-style:italic;">          This text will be rendered in italic style ... Read More

Which property is used in CSS to control the position of an image in the background?

Giri Raju

Giri Raju

Updated on 30-Jan-2020 08:54:23

To control the position of an image in the background, use the background-position property.ExampleYou can try to run the following code to learn how to work with the background-position property. It sets the background image position 30 pixels away from the left side:<html>    <head>       <style>     ... Read More

How to add CSS rules into an HTML document

Giri Raju

Giri Raju

Updated on 30-Jan-2020 08:22:32

You can put your CSS rules into an HTML document using the <style> element. This tag is placed inside <head>...</head> tags. Rules defined using this syntax will be applied to all the elements available in the document.The following is an example:<!DOCTYPE html> <html>    <head>       <style media ... Read More

What MySQL returns on passing an invalid string as an argument to STR_TO_DATE() function?

Giri Raju

Giri Raju

Updated on 30-Jan-2020 06:06:03

If we pass an invalid string as an argument to STR_TO_DATE() function then MySQL will return NULL as output along with a warning. Following is an example to understand the same −mysql> Select STR_TO_DATE('20173210', '%Y%d%m'); +-----------------------------------+ | STR_TO_DATE('20173210', '%Y%d%m') | +-----------------------------------+ | NULL               ... Read More

What is the range of date time value that we can pass as an argument to MySQL UNIX_TIMESTAMP function?

Giri Raju

Giri Raju

Updated on 30-Jan-2020 05:24:36

The range of date time value that we can pass as an argument to MySQL UNIX_TIMESTAMP function is the same as the range of TIMESTAMP data type i.e. between ‘1970-01-01 00:00:01’ to ‘2038-01-19 08:44:07’. If we give the date time values in UNIX_TIMESTAMP function beyond or below TIMESTAMP range, MySQL ... Read More

What kind of output is produced by UNIX_TIMESTAMP() function?

Giri Raju

Giri Raju

Updated on 28-Jan-2020 10:25:19

The function UNIX_TIMESTAMP produce the output in seconds i.e this function will convert the specified date or datetime value into a total number of seconds.For example, the date ‘1970-05-15 05:04:30’ would be converted to total 11576070 seconds by UNIX_TIMESTAMP function.mysql> select UNIX_TIMESTAMP('1970-05-15 05:04:30'); +---------------------------------------+ | UNIX_TIMESTAMP('1970-05-15 05:04:30') | +---------------------------------------+ | ... Read More

Advertisements