48,757 Members
6 added today
405,214 Resources
184 added today

All Devdex   All Gurus  

How to use the PLSQL exists function
Author: David Nishimoto
Rating: Rate this Resource
Visits: 3473

Discuss in Newsgroups

Function:Exists
Description:Exists can be used
in a sql to determine if a subquery returns
results.

Example

Exists with a select

01> select field1 from table1 a where
02> exists (select '' from table2 b where a.field1=b.field1)

02> The subquery produces a recordset if field1 of table1
is equal to field1 of table2.   01> Then displays
field1 records from table1 that produce a subquery
result.

Exists with a update

01> update table1 set field1='abc' where
02> exists (select '' from table2 b where a.field1=b.field1)

02> The subquery produces a recordset if field1 of table1
is equal to field1 of table2.   01> Table1 updates
field1 with the value 'abc' for all records from table1
that produce a subquery result.


Visit my guru profile

Visitor Comments

Be the first to rate this article!

 

Rate this Article







	
	
	



ASP.NET Shopping Cart
Unlimited items/categories
Unlimited options/choices
Ecommerce toolkit for .NET!

ASP ArticlesThis category has been added to your weekly newsletter
ASP Web Sites
ADSI & WSH BooksThis category has been added to your weekly newsletter
FREE ComponentsThis category has been added to your weekly newsletter
ASP EventsThis category has been added to your weekly newsletter
ASP HeadlinesThis category has been added to your weekly newsletter

CSharp ArticlesThis category has been added to your weekly newsletter
C# Web SitesThis category has been added to your weekly newsletter

SQL ArticlesThis category has been added to your weekly newsletter
SQL Events
SQL HeadlinesThis category has been added to your weekly newsletter
SQL Jobs

Jobs in CaliforniaThis category has been added to your weekly newsletter

XML ArticlesThis category has been added to your weekly newsletter
XML BooksThis category has been added to your weekly newsletter
XML Web Sites
XML Tutorials

free asp host

"Alex Homer"This search has been added to your weekly newsletter

Edit My Favorites Edit Profile & Favorites

Web Programming

 




Developersdex Home | ASP | C# | SQL | VB | XML | Gurus
Add Your Link | Add Your Code | FAQ | Advertise | Link To Us | Contact Us |
Copyright © 2009 Developersdex™. All rights reserved.