MySQL delete with a left join

Posted by admin on Oct 6, 2010 in Uncategorized |
delete older.* from radacct older
    left outer join radacct newer 
    on older.framedipaddress = newer.framedipaddress
    where older.acctstoptime is null
    and newer.acctstarttime > older.acctstarttime;

Leave a Reply

XHTML: You can use these tags:' <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Copyright © 2008-2017 Brinsmead Data Services All rights reserved.