Got ORA- 00903: invalid table name when create table under different schema
Hi Friends,
I tried to create a table under other schema "test", but failed with ORA- 00903,
but when I switched to schema "test" and issued same DDL, it worked, am I wrong or missing something? please help, thanks in advance.
SQL> conn sys/sys@evdata as sysdba
Connected.
SQL> create user test identified by test;
User created.
SQL> grant connect, resource to test;
Grant succeeded.
SQL> CREATE TABLE test.country
2 (
3 name VARCHAR2(50),
4 code2 VARCHAR2(2),
5 code3 VARCHAR2(3),
6 CONSTRAINT pk_country PRIMARY KEY(code2)
7 USING INDEX
8 (CREATE UNIQUE INDEX uidx_country_code2 ON test.country(code2))
9 );
(CREATE UNIQUE INDEX uidx_country_code2 ON test.country(code2))
*
ERROR at line 8:
ORA-00903: invalid table name
SQL> CREATE TABLE test.country
2 (
3 name VARCHAR2(50),
4 code2 VARCHAR2(2),
5 code3 VARCHAR2(3)
6 );
Table created.
SQL> drop table test.country
2 ;
Table dropped.
SQL> conn test/test@evdata
Connected.
SQL> CREATE TABLE test.country
2 (
3 name VARCHAR2(50),
4 code2 VARCHAR2(2),
5 code3 VARCHAR2(3),
6 CONSTRAINT pk_country PRIMARY KEY(code2)
7 USING INDEX
8 (CREATE UNIQUE INDEX uidx_country_code2 ON test.country(code2))
9 );
Table created.
SQL>