On Wed, Jun 15, 2005 at 14:35:42 +0200, Praveen Raja <[EMAIL PROTECTED]> wrote: > Thanks. The UPDATE works ok now. But using the same logic it doesn’t > seem possible to delete rows. Is this also possible?
Yes. When you use table names in the where clause they are automatically added to the join list if they aren't list in the from item list. For 8.1 this will be changing. There will be a USING clause on DELETE statements that can be used to list extra tables and the implied from feature will be disabled by default. > > Try something like this > > > > UPDATE table1 > SET col1 = b.col1 > FROM table1 b > WHERE table1.col2 = b.col2 and > table1.col3 = ‘something’ and > b.col3 = ‘somethingelse’ ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match