Basic PL SQL question
Category: Computers > Programming
Asked by: bbsch1245-ga
List Price: $2.50
20 Oct 2003 16:58 PDT
Expires: 19 Nov 2003 15:58 PST
Question ID: 268084
What is the PLSQL command that will count the unique entries in a column? So if the table has this column ACCOUNT ACCOUNT 1 1 2 3 The answer would be 3. I tried "Select count unique ACCOUNT from table" and that didn't work "Select unique ACCOUNT from TABLE" works to list all the unique ones, but I just want the count of unique ones. Thanks.
Re: Basic PL SQL question
Answered By: andyt-ga on 20 Oct 2003 17:24 PDT
Hi bbsch1245-ga, You were close with your try of "Select count unique ACCOUNT from table" The proper format is "Select count(distinct ACCOUNT) from table" Research technique: sql select count sql select count(*) A great sql tutorial can be found at http://www.w3schools.com/sql . I reference it all the time. In addition, an example of select count can be found at http://forums.devshed.com/t58759/s.html If you need a clarification, don't hesitate to ask, andyt-ga
rated this answer:
Thanks! I especially appreciate the pointer to the sql tutorial. If there's a tutorial specifically for Oracle PL Sql do let me know. Thanks,
|There are no comments at this time.|
If you feel that you have found inappropriate content, please let us know by emailing us at firstname.lastname@example.org with the question ID listed above. Thank you.
|Search Google Answers for|