mysql sql 从两张表查询

select channel.fk_cps_media as mid, channel.pk_cps_channel as cid, position.pk_cps_position as pid from t_cps_channel as channel INNER JOIN t_cps_position as position
ON channel.pk_cps_channel=position.fk_cps_channel;

select channel.fk_cps_media as mid, channel.pk_cps_channel as cid, position.pk_cps_position as pid from t_cps_channel as channel, t_cps_position as position
where channel.pk_cps_channel=position.fk_cps_channel;

你可能感兴趣的:(mysql)