HELP .. DISTINCT and a join - usually indicates loose programming. Replace by EXISTS
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: HELP .. DISTINCT and a join - usually indicates loose programming. Replace by EXISTS

  1. #1
    Join Date
    Mar 2001
    Posts
    3

    Lightbulb

    Can someone give me an example where you
    would use an exists rather then a distinct in a sql stmt?

    DISTINCT and a join - usually indicates loose programming. Replace by EXISTS


    ex: select distinct (conv_acct_id) from lookup_exception

    what would the exists stmnt look like?

  2. #2
    Join Date
    Aug 2000
    Posts
    462
    select distinct(conv_acct_id) from lookup_exception where exists(select something from somewhere where condition=true);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width