APM: DBI multi table delete

Jeremy Brooks jeremy.brooks at univista.com
Mon Feb 23 10:53:42 CST 2004


I need to quickly come up with a sql statement to run from a perl/DBI
script that deletes all records from several tables that have a
particular username, 'joe', in the username column.  I know this is
probably simple, but what I've done so far hasn't worked as expected.  I
think that these are the correct DELETE and FROM clauses:

DELETE t1,t2,t3,t4,t5 FROM t1,t2,t3,t4,t5

But, I'm not sure how to write the condition that determines what
records to delete.  let's say I want to delete any record from all of
the tables that have a username value of 'joe'.

Can some please show me exactly what the sql statement ought to be?

thank in advance!
-Jeremy

   




More information about the Austin mailing list