select LineId,Id,Country from Domestic union allselect LineId,Id,Country from Freedom-- 联合查询Domestic,Freedom表的LineId,Id,Country all代表不去除重复--功能:[SQL语句] UNION [SQL语句]将两个语句中选择的同一列中的不同的值筛选出来 SELECT<表1>.<列名> ,<表2><列名>FROM<表1>OUTER JOIN<表2> ON<表1>.<列>=表2>.<列名>--功能:实现两个表的外连接 Select Domestic.LineId,Freedom.LineId from Domestic,Freedom where Domestic.Sames=Freedom.Sames Select Domestic.LineId,Freedom.LineId FROM Domestic inner join Freedom on Freedom.Sames=Domestic.Sames --功能:实现两个表的内连接 把Domestic,Freedom两个表用Domestic.Sames=Freedom.Sames关联起来显示Domestic.LineId,Freedom.LineId
联系客服