In this case, SPACE() function would add white spaces depending upon the condition given in WHERE clause. The following example from student table will demonstrate it.Examplemysql> Select Id, Name, Space(5) from student WHERE Name='Harshit'; +------+---------+----------+ | Id | Name | Space(5) | +------+---------+----------+ | 15 | Harshit ... Read More
MySQL table’s column name can be used along with SPACE() function to add white spaces between two column, after or before a specified column. Following the example from the data of ‘Student’ table is used to demonstrate it.Examplemysql> Select Id, Space(8), Name from Student; +------+----------+---------+ | Id | Space(8) ... Read More
Actually, INTERSECTION is just an inner join on all columns. We are taking a simple example of two tables, having the data as follows −mysql> Select * from value1; +------+------+ | i | j | +------+------+ | 1 | 1 | | 2 | 2 ... Read More
It can be understood with the help of an example in which two tables are having some values and we subtract the values with the help of LEFT JOIN. Here we are taking two tables having the following data −mysql> Select * from value_curdate; +----+----------+-------+ | Id | Product | ... Read More
MySQL SPACE() function is used to add white spaces between two strings. The argument passed in SPACE() function is an integer which specifies how many white spaces we want to add.SyntaxSPACE(N)Here, N is an integer specifies the number of white spaces we want to add.Examplemysql> Select 'My Name is', Space(5), ... Read More
Actually, sometimes we can avoid data-driven relationships in tables and we need to join them. It can be done with the help of CASE statement in the SELECT list to handle the joining possibilities. To understand it, we are taking the example of three data-driven tables namely ‘Student_Detail’ which have ... Read More
In both the cases i.e. on not using ‘RIGHT’ or ‘LEFT’ keyword in the query, MySQL will return the result by taking it as INNER JOIN query. It is because the only difference between RIGHT, LEFT and INNER JOIN is the keyword of RIGHT or LEFT. To understand it, we ... Read More
The use of wildcards with RLIKE operators can save a lot of effort when we write a query that looks for some pattern (regular expression) in character string. The wildcards used with RLIKE are:^ − It signifies BEGINING of the string. In other words when we use this wildcard with ... Read More
It is similar to LEFT join except that the treatment of tables is reversed. With a RIGHT join, every row from the right table will appear in the result set. For the rows in the right table that do not have the matching rows in the left table, NULL appears ... Read More
While joining two tables using a LEFT join, the concept of left table and right table are introduced and a join-predicate is also required. It returns all the rows in the left table including rows that satisfy join-predicate and also rows which do not satisfy join-predicate. For the rows that do ... Read More