Friday, July 15, 2016

COUNT FUNCTIONALITIES IN SQL

count(*):

It selects all the columns in the table and then count the rows in a table

Example:select  count(*) from emp;

count(1):

It selects the first column from the table and then count the rows and including null values also.

Example:select  count(1) from emp;

count(column name):

It select the column and then count all the rows except null values

Example:select  count(empno) from emp;

count(distict column name):

It will count the rows in  column with distinct values

Example: select  count( distinct empno) from emp;

No comments:

Post a Comment

Oracle Fusion - Cost Lines and Expenditure Item link in Projects

SELECT   ccd.transaction_id,ex.expenditure_item_id,cacat.serial_number FROM fusion.CST_INV_TRANSACTIONS cit,   fusion.cst_cost_distribution_...