标签:style blog color sp on div log ad ef
在其中一个表上,右键,选择"New Query",弹出"Add Table"对话框,将待joint的两个表Add,并选择相应字段,则会自动构建joint语句,其中,进行管理的字段,只需要按住鼠标进行拖动管理字段即可.
如:
SELECT t_business.business_id AS Expr1, t_business.latitude, t_business.longitude, t_checkin.* FROM t_business INNER JOIN t_checkin ON t_business.business_id = t_checkin.business_id
不过,默认的是INNER JOIN,若想保留其中一张表,即修改为 left/right joint即可.
如:
SELECT t_business.business_id AS Expr1, t_business.latitude, t_business.longitude, t_checkin.FId, t_checkin.checkin_info, t_checkin.business_id, t_checkin.type FROM t_business LEFT OUTER JOIN t_checkin ON t_business.business_id = t_checkin.business_id
VS会自动插入Outer关键字.
标签:style blog color sp on div log ad ef
原文地址:http://www.cnblogs.com/listened/p/4122303.html