Receiving error : ORA-01747 While trying to calculate COUNT(*) of a specific table

oracle-11gplsqlquery

Hope you're doing well.
I have two tables and as I far as I know for this scenario there is no need for their structures.

When I run this query :

SELECT COUNT(T.*) AS X
FROM table1 T INNER JOIN table2 M
     ON T.col1= M.col2

I receive this error:

ORA-01747:invalid user.table.column, table.column,or column specification

Is there something I'm missing here?? Dose this query have something which is against database rule?
thanks in advance

Best Answer

That is not valid syntax.

SQL> select count(t.*) as x from dual t;
select count(t.*) as x from dual t
               *
ERROR at line 1:
ORA-01747: invalid user.table.column, table.column, or column specification


SQL> select count(*) as x from dual t;

         X
----------
         1

SQL>