Oracle sql语法错误,
sql 如下: select count(x.*) from sck_kz x,(select user_id from sck_kz group by user_id having count(distinct mobile)=1) y where x.user_id=y.user_id; 求解 错误提示:ORA-01747: invalid user.table.column, table.column, or column specification
sql 如下: select count(x.*) from sck_kz x,(select user_id from sck_kz group by user_id having count(distinct mobile)=1) y where x.user_id=y.user_id; 求解 错误提示:ORA-01747: invalid user.table.column, table.column, or column specification
答案:select a.* from (select user_id,count(x.*) from sck_kz x group by user_id) a inner join
(select user_id from sck_kz group by user_id having count(distinct mobile)=1) y on a.user_id=y.user_id;
上一个:Oracle 怎么保护一个表不被删除
下一个:ORACLE数据库,一个segment可以横跨多个datafile。而Extent则不能跨越 datafile。请问对吗?