Monday, June 9, 2014

Common SQL Commands

Delete all except:

DELETE FROM edu_subscription WHERE id NOT IN ( 
SELECT id FROM edu_subscription
WHERE status_value_code = 'YES'
UNION
SELECT id FROM edu_subscription
WHERE status_value_code = 'NO'
)

No comments:

Post a Comment