Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

Created a demo table called TEST_TABLE comprising of 4 rows( ENAME,DEPTO,SAL,COMM ) from the parent table EMP using the

following query: CREATE TABLE TEST_TABLE AS SELECT ENAME,DEPTNO,SAL,COMM FROM EMP The data in the table is as shown: SELECT * FROM TEST_TABLE

Ran the following query to see the result SELECT COUNT(*) AS TABLE_COUNT, COUNT(1) AS TABLE_COUNT1, COUNT(COMM) AS COMM_COUNT, COUNT(4) AS TRIAL_COUNT FROM TEST_TABLE Following is the output:

Conclusion:Count(4) or Count(n) gives same result as Count(*).

You might also like