![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 4219 Articles for MySQLi
![radhakrishna](https://www.tutorialspoint.com/assets/profiles/13544/profile/60_40618-1512640354.jpg)
1K+ Views
Parameters make the stored procedure more useful and flexible. In MySQL, we have the following three kinds of modes −IN modeIt is the default mode. When we define an IN parameter in a stored procedure, the calling program has to pass an argument to the stored procedure. The value of an IN parameter is protected which means that even the value of the IN parameter is changed inside the stored procedure; its original value is retained after the stored procedure ends.OUT modeThe value of an OUT parameter can be changed inside the stored procedure and its new value is passed back to the calling ... Read More
![Rama Giri](https://www.tutorialspoint.com/assets/profiles/13881/profile/60_68188-1512710896.jpg)
88 Views
When we include an expression within SUM() function then MySQL evaluates it for each row of data and the total result is returned. To understand it, consider the following example of table ‘employee’, having the following details −mysql> Select * from Employee; +----+--------+--------+ | ID | Name | Salary | +----+--------+--------+ | 1 | Gaurav | 50000 | | 2 | Rahul | 20000 | | 3 | Advik | 25000 | | 4 | Aarav | 65000 | | 5 | Ram | 20000 | | 6 | Mohan | 30000 | | 7 | Aryan | ... Read More
![Moumita](https://www.tutorialspoint.com/assets/profiles/13507/profile/60_122499-1557898491.jpg)
65 Views
To get some starting number of characters from the data stored in the MySQL table’s column, we can use MySQL LEFT() function. It will return the number of characters specified as its argument. We need to provide the name of the column, having the particular record from which we want to get starting characters, as its first argument. To demonstrate it we are taking the example of a table named ‘examination_btech’ having the following examination details of students −mysql> Select * from examination_btech; +-----------+----------+--------+ | RollNo | Name | Course | +-----------+----------+--------+ | 201712001 | Rahul ... Read More
![Lakshmi Srinivas](https://www.tutorialspoint.com/assets/profiles/13528/profile/60_91717-1512651120.jpg)
65 Views
To get some last number of characters from the data stored in MySQL table’s column, we can use MySQL RIGHT() function. It will return the number of characters specified as it argument. We need to provide the name of the column, having the particular record from which we want to get last characters, as its first argument. To demonstrate it we are taking the example of a table named ‘examination_btech’ having the following examination details of students −mysql> Select * from examination_btech; +-----------+----------+--------+ | RollNo | Name | Course | +-----------+----------+--------+ | 201712001 | Rahul | ... Read More
![Anvi Jain](https://www.tutorialspoint.com/assets/profiles/13591/profile/60_98631-1512716973.jpg)
365 Views
With the help of SHOW CREATE PROCEDURE statement, we can see the source code of a stored procedure. To make it understand we are using the stored procedure named allrecords() in the query as follows −mysql> Show Create Procedure allrecords\G *************************** 1. row *************************** Procedure: allrecords sql_mode:ONLY_FULL_GROUP_BY, STRICT_TRANS_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION Create Procedure: CREATE DEFINERb=`root`@`localhost` PROCEDURE `allrecords`() BEGIN Select * from Student_info; END character_set_client: cp850 collation_connection: cp850_general_ci Database Collation: latin1_swedish_ci 1 row in set (0.00 sec)Read More
![Sravani S](https://www.tutorialspoint.com/assets/profiles/13538/profile/60_67753-1512711355.jpg)
78 Views
We can use mysql.proc to see the list, along with complete information, of stored procedures in a particular MySQL database by the following query −mysql> Select * from mysql.proc where db = 'query' AND type = 'PROCEDURE' \G *************************** 1. row *************************** db: query name: allrecords type: PROCEDURE specific_name: allrecords language: SQL sql_data_access: CONTAINS_SQL is_deterministic: NO security_type: DEFINER ... Read More
![mkotla](https://www.tutorialspoint.com/assets/profiles/13540/profile/60_41073-1512640012.jpg)
84 Views
We can see only the list of stored procedures in a particular MySQL database by the following query −mysql> SHOW PROCEDURE STATUS WHERE db = 'query'\G *************************** 1. row *************************** Db: query Name: allrecords Type: PROCEDURE Definer: root@localhost Modified: 2017-11-11 09:56:11 Created: 2017-11-11 09:56:11 Security_type: DEFINER Comment: character_set_client: cp850 collation_connection: cp850_general_ci Database Collation: latin1_swedish_ci 1 row in set (0.01 sec)
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
901 Views
Suppose if we are calculating the sum of the values of a column which also have NULL values then MySQL SUM() function ignores the NULL values and does the sum of the rest of the values. To understand it, consider the following example of table ‘employee’, having following details − mysql> Select * from Employee; +----+--------+--------+ | ID | Name | Salary | +----+--------+--------+ | 1 | Gaurav | 50000 | | 2 | Rahul | 20000 | | 3 | Advik | 25000 | | 4 | ... Read More
![Giri Raju](https://www.tutorialspoint.com/assets/profiles/13536/profile/60_72105-1512540773.jpg)
100 Views
We can see only the list of stored procedures in a particular MySQL database by the following query −mysql> SELECT ROUTINE_TYPE, ROUTINE_NAME FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_SCHEMA = 'query'AND ROUTINE_TYPE = 'PROCEDURE'// +--------------+------------------------+ | ROUTINE_TYPE | ROUTINE_NAME | +--------------+------------------------+ | PROCEDURE | allrecords | +--------------+------------------------+ 1 row in set (0.05 sec)
![V Jyothi](https://www.tutorialspoint.com/assets/profiles/13530/profile/60_77592-1512648869.jpg)
78 Views
We can write the following query to see only the name and types of procedures in a particular MySQL database. To make it understand we are using the database named ‘query’ −mysql> Select Name, Type from mysql.proc where db = 'query'; +------------+-----------+ | Name | Type | +------------+-----------+ | allrecords | PROCEDURE | | Hello | FUNCTION | +------------+-----------+ 2 rows in set (0.18 sec)