Unique Data in Oracle SELECT COUNT DISTINCT

How To SELECT Unique Data COUNT DISTINCT Oracle Database Tutorial Example

Run Query Editor then copy & paste the below code to count number of unique data or rows by using SELECT COUNT keyword from a table in Oracle Database Server Tutorial Example

   -- CONNECT AS HR
   -- Let's count how many unique SALARY data in HR.EMPLOYEES table

   SELECT COUNT(DISTINCT SALARY) FROM EMPLOYEES;

      -- That's it!! DISTINCT(Unique) SALARY data count has been viewed in oracle database
      -- is comment in Oracle
      -- in fact it is comment in MSSQL and MySQL as well
   

How To SELECT Unique Data COUNT DISTINCT Oracle Database Tutorial Example - Result in Query Editor Client Tools

No comments:

Post a Comment

leave your comments here..