Vanithasree has Published 85 Articles

How can we write MySQL handler, in a stored procedure, that throws an error message and continues the execution?

vanithasree

vanithasree

Updated on 12-Feb-2020 08:00:57

520 Views

As we know that whenever an exception occurred in MySQL stored procedure, it is very important to handle it by throwing proper error message because if we do not handle the exception, there would be a chance to fail application with that certain exception in a stored procedure. MySQL provides ... Read More

How can we get an idea about the server performance from the output of MySQL?

vanithasree

vanithasree

Updated on 11-Feb-2020 07:02:22

46 Views

After running a query, MySQL returns the number of rows and gives time in the output that shows how much it took for running that query. As for example, if we run the following querymysql> create table e1(id int); Query OK, 0 rows affected (0.23 sec)It is showing the time ... Read More

How to call a JavaScript function from C++?

vanithasree

vanithasree

Updated on 10-Feb-2020 10:44:18

752 Views

To call a JavaScript function from C++, generate a js file, which calls the function. The web page will load the JS and the function runs −int callId = 0; void callFunction() {    // the js file    ofstream fout("generate.js");    fout

How to set the whitespace between text in CSS?

vanithasree

vanithasree

Updated on 31-Jan-2020 06:37:37

119 Views

To set the whitespace between text, use the white-space property. Possible values are normal, pre, nowrap.ExampleYou can try to run the following code to set the whitespace between text in CSS:                            This text has a line break ... Read More

Set the font family with CSS

vanithasree

vanithasree

Updated on 30-Jan-2020 10:34:23

462 Views

The font-family property is used to change the face of a font. Possible value could be any font family name.                            This text is rendered in either georgia, garamond, or the default serif font          depending on which font you have at your system.          

Usage of background-attachment property in CSS

vanithasree

vanithasree

Updated on 30-Jan-2020 09:23:52

73 Views

The background-attachment property is used to control the scrolling of an image in the background.ExampleYou can try to run the following code to learn how to work with the background-attachment property:                    body {             ... Read More

ID Selectors in CSS

vanithasree

vanithasree

Updated on 30-Jan-2020 07:54:45

351 Views

You can define style rules based on the id attribute of the elements. All the elements having that id will be formatted according to the defined rule. #black {    color: #000000; }This rule renders the content in black for every element with id attribute set to black in our document. ... Read More

What is the query to know about all character sets supported by MySQL?

vanithasree

vanithasree

Updated on 30-Jan-2020 06:23:43

70 Views

With the help of the following query we can see all the character sets supported by MySQL −mysql> Show Character Set; +-----------+-----------------------------+---------------------+--------+ | Charset   | Description                 | Default collation   | Maxlen | +---------- +-----------------------------+---------------------+--------+ | big5      | Big5 ... Read More

With the help of function, how can we return the difference in Year, Month and Days between two date values?

vanithasree

vanithasree

Updated on 29-Jan-2020 06:37:59

38 Views

We can create a function, which accepts the date values as its argument and returns the difference in year, month and days, as followsmysql> CREATE FUNCTION date_difference(Date1 DATE, date2 DATE) RETURNS VARCHAR(30)    -> RETURN CONCAT(    -> @years := TIMESTAMPDIFF(YEAR, date1, date2), IF (@years = 1, ' year, ', ... Read More

How does comparison operator work with date values in MySQL?

vanithasree

vanithasree

Updated on 28-Jan-2020 10:41:23

123 Views

Comparison operator between dates will work in a logical way. In the following example, while comparing two dates, MySQL is simply comparing two numbers or string −mysql> select 20171027 < 20150825; +---------------------------+ | 20171027 < 20150825       | +---------------------------+ |                 ... Read More

Advertisements