[TYPO3-core] RFC: Bug #11903: Use separate tables for tags in the caching framework

Xavier Perseguers typo3 at perseguers.ch
Mon Sep 28 13:57:24 CEST 2009


Hi,

>> For the SQL Server (and Oracle) I haven't found a way to get the job done in a single (nested)
>> statement. So have to use two statements:
>>
>> DELETE FROM table2
>>  WHERE id IN
>>   (SELECT table1.id
>>    FROM table1 JOIN table2 ON (table1.id=table2.id)
>>    WHERE table1.column1=value)
>> DELETE FROM table1
>>  WHERE table1.column1=value
> 
> If both tables have a key (which they do for our use cases) then on Oracle this might work:
> 
> DELETE FROM
>  (SELECT table1.id, table2.id
>    FROM table1 JOIN table2 ON (table1.id=table2.id)
>    WHERE table1.column1=value)
> 
> Maybe DELETEmultipleTablesQuery() won't fly, but there is a chance for DELETEqueryTwoTables().

Tested the latest statement (with single DELETE) on Oracle: does only 
delete items from table1, not from table2.

-- 
Xavier Perseguers
MVC ExtJS Leader

http://forge.typo3.org/projects/show/extension-mvc_extjs


More information about the TYPO3-team-core mailing list