List:General Discussion« Previous MessageNext Message »
From:Gerald Taylor Date:November 10 2004 9:50pm
Subject:Re: Tricky self join query help?
View as plain text  
The parts I am interested in:

(I won't bore you with the fields not relevant to this problem )

CREATE TABLE events (
   e_id int(15) NOT NULL auto_increment,
   e_owner int(15) NOT NULL default '0',
   e_time int(15) NOT NULL default '0',
   ....other junk omitted....
   PRIMARY KEY  (e_id)
) TYPE=MyISAM;


Thanks....
And I am liking that other answer although it has
all nulls in the second owner column and I don't get how it works.

When I write applications that delete I always
back up the table and use a copy or a small
sample on a play database.


SGreen@stripped wrote:
> 
> If you post the table structure (SHOW CREATE TABLE tablename\G) we could 
> help you write this statement.
> 
> Shawn Green
> Database Administrator
> Unimin Corporation - Spruce Pine
> 
> Gerald Taylor <platypus@stripped> wrote on 11/10/2004 11:52:35 AM:
> 
>  > I have this table of events. Each event has an owner
>  > id and the time that it happened.
>  >
>  > What I want to do is delete all events
>  > more than three months old  but only if the owner does not own
>  > any newer events.
>  >
>  > The coolest would just be a single DELETE query.
>  >
>  > Can this be done?
>  > Mysql 4.0.18
>  >
>  >
>  >
>  >
>  >
>  >
>  > --
>  > MySQL General Mailing List
>  > For list archives: http://lists.mysql.com/mysql
>  > To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>  >


Thread
mysql NOT operatorL a n a7 Nov
  • RE: mysql NOT operatorDonny Simonton7 Nov
    • Tricky self join query help?Gerald Taylor10 Nov
      • Re: Tricky self join query help?SGreen10 Nov
        • Re: Tricky self join query help?Gerald Taylor10 Nov
          • Re: Tricky self join query help?Brent Baisley11 Nov
      • Re: Tricky self join query help?Brent Baisley10 Nov
  • Re: mysql NOT operatorFrederic Wenzel7 Nov
Re: mysql NOT operatorJon Stephens7 Nov