Multi-Table query: (data collection in multiple tables into a table)
SELECT user_name as ' nickname ', Gname as ' game name ', score as ' fraction '
From Users,games,scores
WHERE USERS. User_qq=scores. User_qq
and games. Gno=score. GNO
Connection query: internal and external connections
Inner Connection: The two tables connected are equal, if the contents of the two tables do not correspond then do not connect.
Implicit inner joins: Multiple table names appear directly after the from.
Explicit intra-connection: Seclet user_name from TABLE1 [INNER] JOIN TABLE2 on TABLE1. Col=table2. COL (faster than implicit intra-connection execution)
Outer joins: Left Outer and right outer joins (LETF | Right[outer])
The data in the underlying table must appear, and no data in the other table is represented by a null value.
First appears as the left table, and then appears as the right table.
Seclet User_name,gno,score
From the users left JOIN SCORES on USERS. User_qq=scores. USER_QQ and Gno=5
MySQL connection query