[vox-tech] MySQL 3.x - deleting orphan rows & datetime()
Foo Lim
vox-tech@lists.lugod.org
Fri, 7 May 2004 16:12:52 -0700 (PDT)
On Fri, 7 May 2004, Jeff Newmiller wrote:
> On Fri, 7 May 2004, Foo Lim wrote:
>
> > On Fri, 7 May 2004, David Siedband wrote:
> >
> > > Greetings,
> > >
> > > I have two questions - using MySQL 3.x
> > >
> > > [1] I'm trying to craft an SQL query to delete orphan rows in index
> > > tables
> > >
> > > something like:
> > >
> > > delete from DocWords left join Docs on Docs.ID = DocWords.DocID where
> > > Doc.ID is null
> > >
> > > Any suggestions how to do this?
> >
> > Hi David,
> >
> > Try using a subquery:
> >
> > delete from DocWords
> > where DocID not in
> > (select ID from Docs);
>
> Subqueries are not implemented in MySQL 3.x.
Well, that sucks!
(Ducks...)
Foo
PostgreSQL user