Krantik Chavan has Published 308 Articles

Create a MySQL stored procedure that counts the number of rows gets affected by MySQL query?

Krantik Chavan

Krantik Chavan

Updated on 22-Jun-2020 08:13:41

993 Views

Following is a procedure that counts the number of rows get affected by MySQL query −mysql> Delimiter // mysql> CREATE PROCEDURE `query`.`row_cnt` (IN command VarChar(60000))     -> BEGIN     -> SET @query = command;     -> PREPARE stmt FROM @query;     -> EXECUTE stmt;     ... Read More

How can we access tables through MySQL stored procedures?

Krantik Chavan

Krantik Chavan

Updated on 22-Jun-2020 07:02:44

258 Views

We can access one or all the tables from the MySQL stored procedure. Following is an example in which we created a stored procedure that will accept the name of the table as a parameter and after invoking it, will produce the result set with all the details from the ... Read More

How can I create a stored procedure to insert values in a MySQL table?

Krantik Chavan

Krantik Chavan

Updated on 22-Jun-2020 05:34:45

12K+ Views

We can create a stored procedure with an IN operator to insert values in a MySQL table. To make it understand we are taking an example of a table named ‘student_info’ having the following data −mysql> Select * from student_info; +------+---------+-----------+------------+ | id   | Name    | Address   ... Read More

How can I know whether MySQL Server is alive or not?

Krantik Chavan

Krantik Chavan

Updated on 20-Jun-2020 11:20:21

242 Views

With the help of ‘mysqladmin’ program, we would be able to know whether our MySQLserver is alive or not. It can be used as follows on the command line −C:\mysql\bin>mysqladmin -u root ping mysqld is aliveThe message after running the command shows that our MySQL server is alive.Read More

What should one use CHAR data type or VARCHAR data type in MySQL?

Krantik Chavan

Krantik Chavan

Updated on 19-Jun-2020 13:29:53

250 Views

Actually, both of these data types in MySQL store strings and can be set with a maximum length. The use of these data types purely depends on the need. Followings are some points which will make us clear that when one should CHAR and when VARCHAR −Suppose if we have ... Read More

What is onmouseover event in JavaScript?

Krantik Chavan

Krantik Chavan

Updated on 19-Jun-2020 11:08:00

2K+ Views

The onmouseover event triggers when the mouse pointer moves over an element.ExampleYou can try to run the following code to learn how to work with onmouseover event in JavaScript −                                         This is demo text for mouseover event.    

How do you check that a number is NaN in JavaScript?

Krantik Chavan

Krantik Chavan

Updated on 17-Jun-2020 06:30:40

166 Views

NaN is a JavaScript property, which is Not-a-Number value. This shows it is not a legal number. Here’s the syntax −SyntaxNumber.NaNTo find out whether a number is NaN, use the Number.isNaN() or isNan() method. Here’s an example to check −ExampleLive Demo           Check     ... Read More

How to create JavaScript objects using new operator?

Krantik Chavan

Krantik Chavan

Updated on 16-Jun-2020 13:39:41

214 Views

The new keyword in JavaScript is the new operator, which creates an instance of a user-defined object type.ExampleYou can try to run the following code to create JavaScript objects using new operator −Live Demo                          var ... Read More

How can I write a form that assists my browser's auto-complete feature?

Krantik Chavan

Krantik Chavan

Updated on 16-Jun-2020 13:30:18

62 Views

The official specification of HTML5 states:When the autofill field name is "on", the user agent should attempt to use heuristics to determine the most appropriate values to offer the user, e.g. based on the element's name value, the position of the element in the document's DOM,  whaUse any of the ... Read More

Fire a JavaScript function when a user finishes typing instead of on key up?

Krantik Chavan

Krantik Chavan

Updated on 16-Jun-2020 11:47:11

223 Views

To fire a JavaScript function when the user finishes typing, try to run the following code −Example                    var timer = null;          $("#myText").keydown(function(){             clearTimeout(timer);             timer = setTimeout(doStuff, 1000)          });          function doStuff() {             alert("Write more!");          }                

Previous 1 ... 4 5 6 7 8 ... 31 Next
Advertisements