Re: [SQL] Replacing a simple nested query?

2003-07-14 Thread Steve Wampler
On Sun, 2003-07-13 at 14:50, Steve Wampler wrote: > I've got a simple nested query: > > select * from attributes where id in (select id from > attributes where (name='obsid') and (value='oid00066')); > > that performs abysmally. I've heard this described as the > 'classic WHERE IN' proble

Re: [SQL] max length of sql select statement (long!)

2003-07-14 Thread markus brosch
It's me again - with the easy and complex statement at the same time ;-) Who can help me?! As far, my solution is still unsatisfactory. I'll explain my full task this time, otherwise it is hard to explain! My tables: (redundant for speed reasons - doesn't matter - only requests!) ===

[SQL] ad hoc referential integrity

2003-07-14 Thread Matt Tenenbaum
At the outset I hope that this is the right place to ask this question (also, I hope the question isn't a foolish one). Say I created a couple tables A and B, where A contains a column p which B references as a foreign key. Further say that, when I created these tables, I meant to specify 'on d

Re: [SQL] ad hoc referential integrity

2003-07-14 Thread Stephan Szabo
On Tue, 15 Jul 2003, Matt Tenenbaum wrote: > Say I created a couple tables A and B, where A contains a column p > which B references as a foreign key. Further say that, when I created > these tables, I meant to specify 'on delete cascade' for p in the > definition of B but didn't. What's the prope