Search notes:

ORA-22818: subquery expressions not allowed here

create table tq84_ora_22818_test (a number);

begin
   insert into  tq84_ora_22818_test values (1   );
   insert into  tq84_ora_22818_test values (2   );
   insert into  tq84_ora_22818_test values (null);
end;
/
The following statement throws ORA-00937: not a single-group group function:
select
   count(a)                                               cnt_a,
  (select count(*) from tq84_ora_22818_test where a = 1)  cnt_a_1
from
   tq84_ora_22818_test;
The following statement throws ORA-22818: subquery expressions not allowed here
select
   count(a)                                               cnt_a,
  (select count(*) from tq84_ora_22818_test where a = 1)  cnt_a_1
from
   tq84_ora_22818_test
group by
  (select count(*) from tq84_ora_22818_test where a = 1);

drop table tq84_ora_22818_test;
Subqueries are not allowed to provide the value for a default column:
create table tq84_p (
   id  number primary key,
   cnt number  default (select count(*) from tq84_p)
);

See also

Subqueries
Other Oracle error messages

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758206649, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/errors/ORA-22818_subquery-expressions-not-allowed-here(72): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78