![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
![Lakshmi Srinivas](https://www.tutorialspoint.com/assets/profiles/13528/profile/60_91717-1512651120.jpg)
672 Views
For achieving this, we must have to use one of the functions as the 1st argument of the other function. In other words, either RPAD() function would be the 1st argument of LPAD() function or LPAD() function would be the 1st argument of RPAD() function. It can be understood with the help of the following exampleExamplemysql> Select RPAD(LPAD(' My name is Ram ', 23, '* '), 30, '* '); +------------------------------------------------+ | RPAD(LPAD(' My name is Ram ', 23, '* '), 30, '* ') | +------------------------------------------------+ | * * * * My name is Ram * * * * ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
96 Views
MySQL has two functions namely LPAD() and RPAD() with the help of which we can pad a string with another string.LPAD() function, as the name suggests, left pads a string with another string. Following is the syntax for using it in MySQLSyntaxLPAD(original_string, @length, pad_string)Here, original_string is the string in which we pad another string.@length is the total length of the string returned after padding.Pad_string is the string which is to be padded with original_string.Examplemysql> Select LPAD('My name is Ram', 22, '* '); +--------------------------------+ | LPAD('My name is Ram', 22, '* ') | +--------------------------------+ | * * * * My name ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
48 Views
In case if the number of characters to be removed exceeds the number of characters available in original string then MySQL INSERT() function will continue to remove the characters until the end of the original string.Examplemysql> Select INSERT('myteststring',3,15,'original'); +----------------------------------------+ | INSERT('myteststring',3,15,'original') | +----------------------------------------+ | myoriginal | +----------------------------------------+ 1 row in set (0.00 sec)
![Rishi Raj](https://www.tutorialspoint.com/assets/profiles/13777/profile/60_73169-1512647303.jpg)
118 Views
For this purpose, We need to use the name of the column as the first parameter i.e. at the place of an original string, of the INSERT() function. Following example will exhibit it −ExampleSuppose we want to add ‘/Old’ with the values of ‘year_of_admission’ column of ‘Student’ table then we need to write following query −mysql> Select INSERT(year_of_admission, 5, 0, '/Old')As 'Old Admissions' From Student; +-----------------+ | Old Admissions | +-----------------+ | 2001/Old | | 2010/Old | | 2009/Old | | 2017/Old | | 2000/Old ... Read More
![Srinivas Gorla](https://www.tutorialspoint.com/assets/profiles/13556/profile/60_78057-1512712331.jpg)
361 Views
We can use the conditions in WHERE clause while exporting the data from MySQL table to a file. It can be understood with the help of an example −ExampleSuppose we are having following data from table ‘Student_info’ −mysql> Select * from Student_info; +------+---------+------------+------------+ | id | Name | Address | Subject | +------+---------+------------+------------+ | 101 | YashPal | Amritsar | History | | 105 | Gaurav | Chandigarh | Literature | | 125 | Raman | Shimla | Computers | | 130 | Ram | Jhansi | ... Read More
![Swarali Sree](https://www.tutorialspoint.com/assets/profiles/13515/profile/60_84115-1512649510.jpg)
61 Views
MySQL INSERT() function performs no insertion if the position of insertion is out of range. The position of insertion can be out of range in the case when we pass a negative or 0(zero) value or the value goes beyond the value of a total number of characters in an original string by 2. It can be understood with the help of the following example −ExampleThe query below will perform no insertion because the position of insertion is out of range i.e. a negative value.mysql> Select INSERT('Virat', -1, 5, 'Kohli'); +-------------------------------+ | INSERT('Virat', -1, 5, 'Kohli') | +-------------------------------+ | Virat ... Read More
![vanithasree](https://www.tutorialspoint.com/assets/profiles/13547/profile/60_85216-1512542720.jpg)
76 Views
While exporting the data from MySQL table to a text file we can use ‘FIELDS TERMINATED BY’, ‘ENCLOSED BY’, ‘LINES TERMINATED BY’ and other options too to put the values of fields in different settings of the text file. It can be illustrated with the help of the following example −ExampleSuppose we are having following data from table ‘Student_info’ −mysql> Select * from Student_info; +------+---------+------------+------------+ | id | Name | Address | Subject | +------+---------+------------+------------+ | 101 | YashPal | Amritsar | History | | 105 | Gaurav | Chandigarh | Literature | | ... Read More
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
42 Views
We cannot use = (comparison operator) because we know that NULL is not a value. If we want to get the rows with NULL from a table then we need to use IS NULL operator in MySQL query. Following example using the data from ‘employee’ table will exhibit it −Examplemysql> Select * from Employee WHERE Salary IS NULL; +----+-------+--------+ | ID | Name | Salary | +----+-------+--------+ | 7 | Aryan | NULL | | 8 | Vinay | NULL | +----+-------+--------+ 2 rows in set (0.00 sec)The query above use IS NULL operator and produces ... Read More
![Abhinanda Shri](https://www.tutorialspoint.com/assets/profiles/13552/profile/60_73264-1512711555.jpg)
646 Views
It can be done by providing the column(s) names in the SELECT … INTO OUTFILE statement while exporting the data from MySQL table into a file. We are illustrating it with the help of the following example −ExampleSuppose we are having following data from table ‘Student_info’ −mysql> Select * from Student_info; +------+---------+------------+------------+ | id | Name | Address | Subject | +------+---------+------------+------------+ | 101 | YashPal | Amritsar | History | | 105 | Gaurav | Chandigarh | Literature | | 125 | Raman | Shimla | Computers | | 130 ... Read More
![Ankitha Reddy](https://www.tutorialspoint.com/assets/profiles/13550/profile/60_73963-1512711511.jpg)
573 Views
It can be done with the help of SELECT … INTO OUTFILE statement. We are illustrating it with the help of the following example − Example Suppose we are having following data from table ‘Student_info’: mysql> Select * from Student_info; +------+---------+------------+------------+ | id | Name | Address | Subject | +------+---------+------------+------------+ | 101 | YashPal | Amritsar | History | | 105 | Gaurav | Chandigarh | Literature | | 125 | Raman | Shimla ... Read More