日期:2014-05-18  浏览次数:20523 次

很难的问题,高手请帮忙

select   *   from   usercompanyproduct   where   ucid   in(4,4,4,9,7)  
这是我的一条语句,我想让他显示五条,可是只能显示三条,可不可以让他显示五条

------解决方案--------------------
select * from usercompanyproduct where ucid = '4 '
union all
select * from usercompanyproduct where ucid = '4 '
union all
select * from usercompanyproduct where ucid = '4 '
union all
select * from usercompanyproduct where ucid = '7 '
union all
select * from usercompanyproduct where ucid = '9 '