左连接,右连接,内连接
1.原始表:左表user_t,右表user_info
2.执行连接
#LEFT JOIN SELECT * FROM user_t LEFT JOIN user_info ON user_name=`name`WHERE 1=1; #RIGHT JOIN SELECT * FROM user_t RIGHT JOIN user_info ON user_name=`name`WHERE 1=1; #INNER JOIN SELECT * FROM user_t INNER JOIN user_info ON user_name=`name`WHERE 1=1;
2.1左连接:以左边为主
2.2右连接:以右边为主
2.3内连接
其他数据库的操作原理类同