Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Quickest way to see if a record exists
Message
From
17/09/2008 06:51:27
 
 
To
17/09/2008 06:39:44
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 6.5 and older
Miscellaneous
Thread ID:
01348134
Message ID:
01348149
Views:
27
>hi
>so what am I doing wrong here
>
>
> SELECT pk  FROM myTable  where exists( SELECT *  FROM myTable  where id ="12345" )
>
>this returns every record in the table
>TIA
>Stuart

You just have record(s) where id is equal to "12345"
What you want as a result from that query?
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform