My setup looks like this
SQL> SELECT tablespace_name, table_name
FROM all_tables
WHERE tablespace_name = 'MYSPACE';
TABLESPACE_NAME TABLE_NAME
-------------------------- ------------------------------
MYSPACE MYTABLENAME
MYSPACE MYOTHERTABLENAME
Now I'd like to SELECT * FROM MYSPACE.MYTABLENAME;
but that's apparently not how you do it.
ERROR at line 1:
ORA-00942: table or view does not exist
My expected result would be to get all records from that table. Like I would if it was MySQL.
Thanks
You are selecting from tablespace, which is not the same as your Owner/Schema name. Thats why. For example the tablespace SYSTEM
has owner SYS
. You do select from Sys.xxx;
Ok.
SELECT owner, tablespace_name, table_name
FROM all_tables
WHERE tablespace_name = 'MYSPACE';
And then
select * from [ owner ].[ table_name ];
(worth to mention: select .. from dba_tables
/ user_tables
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With