Descartes ' accumulation of poor lift
When the connection is not established, the name column of the car table and the Brand_Name column of the brand table are queried by the Cartesian product, which is actually multiplied by the two columns for exhaustive, listing all possibilities
Table joins: Querying data together for different columns of multiple tables
1. Transverse connection
Select column A, column B from table p, table Q where P.O=Q.O O is a column in both tables
Another way of writing Select column A, column B from table P join table Q on P.O=Q.O
Example: Select Student.sno,sname,cno,degree from Student,score where Student.sno=score.sno
= Select Student.sno,sname,cno,degree from Student join score on Student.sno=score.sno
before join, the left is the table with the join to the main select Student.sno,sname,cno,degree from Student to Scroe on student.sno= Scroe.sno
before join, add right to the table with the join to the left to the main select Student.sno,sname,cno,degree from Student-Join Scroe on student.sno= Scroe.sno
2. Add union between two tables in a vertical connection
Only two table columns are the same as the data type for each column, so you can make a vertical connection
"2017-03-13" Tsql table connection