SQL inline Syntax basic syntax (INNER join)
SELECT * FROM table 1 inner JOIN table 2 on table 1.userid= table 2.userid
SQL Inline Syntax Description: The above statement is the query Table 1 and table 22 tables, as long as the UserID field in two tables in the same line to display.
45it.com Note: The above syntax is equivalent to select * FROM table 1, table 2 where table 1.userid= table 2.userid, and the use of SQL inline, will improve a lot of efficiency.
SQL Leftist syntax basic syntax (left OUTER join)
SELECT * FROM table 1 left OUTER JOIN table 2 on table 1.userid= table 2.userid
SQL Leftist syntax Description: Displays all the rows in table 1 and displays all eligible data in table 2 to the result set, if none of the data in table 2 does not appear in the result set, and is displayed as null.
SQL Right syntax base syntax (outer join)
SELECT * FROM table 1 right OUTER JOIN table 2 on table 1.userid= table 2.userid
SQL Leftist syntax Description: Displays all the rows in table 2 and displays all eligible data in table 1 to the result set, if none of the data in the left table 1 does not appear in the result set, and is displayed as null.
SQL Total Syntax basic syntax (full outer join)
SELECT * FROM table 1 full OUTER JOIN table 2 on table 1.userid= table 2.userid
SQL Leftist syntax Description: The above SQL full-link meaning is to display table 1 and table 2 all the rows, to put it simply, is the table 1 and table 2 all the rows together, then filter out duplicate data and display in the result set.