SQL Query Syntax : Using table alias in a count is invalid? Why?
Posted
by contactmatt
on Stack Overflow
See other posts from Stack Overflow
or by contactmatt
Published on 2010-05-25T15:21:00Z
Indexed on
2010/05/25
15:31 UTC
Read the original article
Hit count: 290
Could someone please explain to me why the following query is invalid? I'm running this query against an Oracle 10g database.
select count(test.*) from my_table test;
I get the following error: ORA-01747: invalid user.table.column, table.column, or column specification
however, the following two queries are valid.
select count(test.column) from my_table test;
select test.* from my_table test;
© Stack Overflow or respective owner