标签:ati order style select name sel game stat ott
多表关联时本身有一条数据,但是视图查出重复数据用distinct可以解决。
如:
视图如下
SELECT DISTINCT
t1.station_id as station_id,
t1.tick_sn as tick_sn,
t1.order_id as order_id,
t2.station_name as station_name,
t3.game_id as game_id,
FROM
electric_lottery_report_info t1
LEFT JOIN electric_lottery_station_info t2
ON t1.station_id = t2.station_id
LEFT JOIN electric_lottery_param_info t3
ON t1.game_id = t3.game_id
标签:ati order style select name sel game stat ott
原文地址:http://www.cnblogs.com/xiaoliu001/p/6340767.html