日期:2014-05-17 浏览次数:20428 次
SELECT *
FROM User_Property a
WHERE ((SELECT COUNT(property_mall_ID)
FROM User_Property
WHERE property_mall_ID=a.property_mall_ID and User_Property_UserName = a.User_Property_UserName)>1 )
ORDER BY User_Property_UserName DESC
delete from User_Property where id in
(
select id from
(
(
SELECT dense_rank() OVER (partition BY username+property_mall_ID ORDER BY property_mall_ID
ASC) AS AId,id from User_Property
)
) t where t.aid<>1
)
delete from ax
where id
------解决方案--------------------
username
------解决方案--------------------
property_mall_id in
(select id
------解决方案--------------------
username
------解决方案--------------------
property_mall_id
from (select id,
username,