Reputation: 156
I have created some tables under a system as sysdba session using
create table mytable
(
ID char(20) not null,
val1 char(150),
val2 numeric(4)
);
when i m trying to query the tables everything works fine but when i m trying to look the contents of all_tables or user_tables with : eg. SELECT table_name from all_tables
my tables are nowhere to be found...
Why is that? am i missing something?
What i actualy want to do is to calculate the used blocks from a table i created and the query i use is :
SELECT blocks - empty_blocks
FROM user_tables
WHERE table_name = 'mytable';
which because of the problem i explained above does not work.
Upvotes: 0
Views: 272
Reputation: 1272
Firstly,
Open cmd
and write sqlplus
then connect to user system like this system as sysdba
,
Secondly,
create a new user TEST
with password TEST
with this command create user TEST identified by TEST;
then grant all privileges to the user like this grant all privileges to TEST;
Finally,
connect to the new user with this command conn TEST/TEST
and create your table
Upvotes: 2