delete from table_name
where exists(select 1 from table a, table b
where a.column_name = b.column_name and
a.column_name = bind_variable)
Requires Free Membership to View
Even with the addition of the bind variable my explanation of how the
optimizer will run and cost the two queries is still the same. When using
exists, it executes the interior select for every row in
For More Information
- Dozens more answers to tough Oracle questions from Karen Morton are available.
- The Best Oracle Web Links: tips, tutorials, scripts, and more.
- Have an Oracle or SQL tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
- Ask your technical Oracle and SQL questions -- or help out your peers by answering them -- in our live discussion forums.
- Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.
This was first published in March 2003
Join the conversationComment
Share
Comments
Results
Contribute to the conversation