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

Krantik Chavan
Published on 21-Feb-2018 12:31:52
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 we display MySQL bit values in printable form?

Anjana
Published on 21-Feb-2018 12:30:16
Actually, Bit values are returned as binary values but we can also display them in the printable form with the help of following −By adding 0We can display Bit values in printable form by adding 0 to them. Following the example from the bit_testing table can be used to understand ... Read More

In MySQL, what is Bit-field notation and how it can be used to write bit-field value?

Sharon Christine
Published on 21-Feb-2018 12:28:25
Bit-field notation is the notation with the help of which we can write bit-field values. The syntax of Bit-field notation is as follows −Syntaxb’value’   OR 0bvalueHere, the value is a binary value written by using zeros and ones.The mainly Bit-filed notation is convenient for specifying values to be assigned ... Read More

How can I create a stored procedure to select values on the basis of some conditions from a MySQL table?

seetha
Published on 21-Feb-2018 12:28:09
We can create a stored procedure with IN and OUT operators to SELECT records, based on some conditions, from 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 ... Read More

How can I create MySQL stored procedure with INOUT parameter?

Nishtha Thakur
Published on 21-Feb-2018 12:23:38
Following example will demonstrate MySQL stored procedure with INOUT parameter −mysql> DELIMITER // ; mysql> Create PROCEDURE counter(INOUT count INT, IN increment INT)     -> BEGIN     -> SET count = count + increment;     -> END // Query OK, 0 rows affected (0.03 sec)Here, ‘count’ is the ... Read More

How can I create MySQL stored procedure with OUT parameter?

vanithasree
Published on 21-Feb-2018 12:23:58
To make it understand we are using the table named ‘student_info’ which have the following values −mysql> Select * from student_info; +------+---------+------------+------------+ | id   | Name    | Address    | Subject    | +------+---------+------------+------------+ | 101  | YashPal | Amritsar   | History    | | 105  | ... Read More

What is the method with the help of which the hexadecimal value can be treated as a number?

Sai Nath
Published on 21-Feb-2018 12:20:49
For treating the hexadecimal value as a number, we can use the CAST(… AS UNSIGNED) function. Following example will demonstrate it −mysql> Select 0x54, CAST(0x54 AS UNSIGNED); +------+------------------------+ | 0x54 | CAST(0x54 AS UNSIGNED) | +------+------------------------+ | T    |                     ... Read More

How MySQL evaluates when I use a conditional expression within SUM() function?

Samual Sam
Published on 21-Feb-2018 12:17:03
As we know that, by using a conditional expression within SUM() function we can get the number of rows that meet the condition. So, in this case, MySQL evaluates to 1 each time the condition is true and 0 each time it is false.To understand it, consider the following example ... Read More

How can I create MySQL stored procedure with IN parameter?

Smita Kapse
Published on 21-Feb-2018 12:21:02
To make it understand we are using the table named ‘student_info’ which have the following values −mysql> Select * from student_info; +-----+---------+------------+------------+ | id  | Name    | Address    | Subject    | +-----+---------+------------+------------+ | 101 | YashPal | Amritsar   | History    | | 105 | Gaurav ... Read More

How can we find the most recent and most oldest date from a table with the help of MySQL MAX() and MIN() functions?

Ankith Reddy
Published on 21-Feb-2018 12:19:17
For getting the most recent date from a table, we need to provide the name of the column, having a date as value, as the argument of MAX() function. Similarly, forgetting the oldest date from a table, we need to provide the name of a column, having a date as ... Read More
Advertisements