![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
![seetha](https://www.tutorialspoint.com/assets/profiles/13549/profile/60_42938-1512640859.jpg)
285 Views
We can distinguish between MySQL CROSS JOIN and INNER JOIN only on the basis of join-predicate i.e. the condition specified. While writing the query for INNER JOIN we need to specify the condition but in contrast, we do not need to specify the condition while writing a query for CROSS JOIN. To understand it, we are taking the example of two tables named tbl_1 and tbl_2 which are having following data −mysql> Select * from tbl_1; +----+--------+ | Id | Name | +----+--------+ | 1 | Gaurav | | 2 | Rahul | | 3 | Raman | | 4 ... Read More
![Daniol Thomas](https://www.tutorialspoint.com/assets/profiles/13551/profile/60_130035-1512726078.jpg)
113 Views
Writing cross joins with the help of comma operator is the most basic way to combine two tables. As we know that we can also write cross join by using keyword CROSS JOIN or synonyms like JOIN. To form a cross join we do not need to specify the condition which is known as join-predicate To understand it, we are taking the example of two tables named tbl_1 and tbl_2 which are having following data −mysql> Select * from tbl_1; +----+--------+ | Id | Name | +----+--------+ | 1 | Gaurav | | 2 | Rahul | | 3 ... Read More
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
52 Views
MySQL NOT RLIKE operator can be used to check for a pattern which is not present within an expression. The syntax for NOT RLIKE is as follows − Syntax NOT RLIKE Pat_not_for_match Here Pat_not_for_match is the pattern which is not to be matched with the expression. Example mysql> Select Id, Name from Student WHERE Name NOT RLIKE '^H'; +------+---------+ | Id | Name | +------+---------+ | 1 | Gaurav | | 2 | Aarav | | 20 | Gaurav | ... Read More
![Monica Mona](https://www.tutorialspoint.com/assets/profiles/13520/profile/60_87298-1512650151.jpg)
52 Views
MySQL has function name REVERSE() with the help of which we can reverse the string. But suppose if we want to reverse the string connected by dash then by using REVERSE() function will not give appropriate result as shown in the following example:mysql> Select REVERSE('AB-CD-EF'); +---------------------+ | REVERSE('AB-CD-EF') | +---------------------+ | FE-DC-BA | +---------------------+ 1 row in set (0.00 sec)The appropriate result would be ‘EF-CD-AB’ and for getting such output we can use SUBSTRING_INDEX() function along with Instr() function. It is demonstrated as follows:mysql> Select CONCAT(SUBSTRING_INDEX('AB-CD-EF', '-', -1), '-', substr('AB-CD-EF', instr('AB-CD-EF', "-")+1, instr('AB-CD-EF', "-")), LEFT('AB-CD-EF', ... Read More
![mkotla](https://www.tutorialspoint.com/assets/profiles/13540/profile/60_41073-1512640012.jpg)
124 Views
Writing inner joins with the help of comma operator is the most basic way to combine two tables. As we know that we can also write inner join by using keyword INNER JOIN or synonyms like JOIN. To form an inner join we need to specify a particular condition which is known as join-predicate and while writing inner joins using the comma operator, we use WHERE clause, the only way, to specify the join condition. To understand it, we are taking the example of two tables named tbl_1 and tbl_2 which are having following data:mysql> Select * from tbl_1; +----+--------+ ... Read More
![Giri Raju](https://www.tutorialspoint.com/assets/profiles/13536/profile/60_72105-1512540773.jpg)
159 Views
Actually, in simple words, we can say that a join between tables is an extension of a single-table SELECT statement but it involves the additional complexities:Need to specify all the tablesWe need to specify all the tables in FROM clause which are involved in the join. It is in contrast with the SELECT statement in which only one table name is necessary.Need to specify the matching conditionsWe just need to specify the matching conditions based on which a join matches the records in one table with a record in another table. The conditions often are given in the WHERE clause, ... Read More
![Ayyan](https://www.tutorialspoint.com/assets/profiles/13521/profile/60_79767-1512650417.jpg)
211 Views
MySQL REVERSE() function can have the column name as an argument to invert its value. If we want to apply some condition/s then it can be used along with WHERE clause as follows:Examplemysql> Select Name, REVERSE(Name) from Student; +---------+---------------+ | Name | REVERSE(Name) | +---------+---------------+ | Aarav | varaA | | Gaurav | varuaG | | Gaurav | varuaG | | Harshit | tihsraH | | Yashraj | jarhsaY | +---------+---------------+ 5 rows in set (0.00 sec)The above query inverts the values ... Read More
![Sharon Christine](https://www.tutorialspoint.com/assets/profiles/13517/profile/60_82215-1512649681.jpg)
218 Views
With the help of MySQL string function ASCII(), we can get the number code of a particular character. Its syntax is ASCII(str) where, str, the argument of ASCII() function, is the string whose ASCII value of the first character to be retrieved.It will return the number code the left the most character i.e. first character of the string given as argument.Examplemysql> Select ASCII('T'); +------------+ | ASCII('T') | +------------+ | 84 | +------------+ 1 row in set (0.01 sec) mysql> Select ASCII('t'); +------------+ | ASCII('t') | +------------+ | 116 | +------------+ 1 row ... Read More
![Arushi](https://www.tutorialspoint.com/assets/profiles/13510/profile/60_55588-1512537391.jpg)
120 Views
MySQL REVERSE() function make it possible to invert a string. Its syntax is as follows −SyntaxREVERSE(STR)Here, STR is a string which we want to invert.Examplemysql> Select REVERSE('MySQL'); +------------------+ | REVERSE('MySQL') | +------------------+ | LQSyM | +------------------+ 1 row in set (0.05 sec)
![Arjun Thakur](https://www.tutorialspoint.com/assets/profiles/13574/profile/60_74441-1560315595.jpg)
1K+ Views
If we want to replace strings in multiple records then REPLACE() function must have the column name as 1st argument i.e. at the place of string. It means that, it will replace all the substring with another substring in that particular column. We can also use REPLACE() function with WHERE clause along with UPDATE statement to apply conditions. It is exhibit with the following example:Examplemysql> Update Student set Name = REPLACE(Name, 'G', 'S') WHERE Subject LIKE '%Comp%'; Query OK, 2 rows affected (0.08 sec) Rows matched: 2 Changed: 2 Warnings: 0The above query replaces strings in multiple records of Student ... Read More