default

When we create a table what is the default user ... if we do not specify.
same way what will be the default tablespace..
dev_dbaAsked:
Who is Participating?
 
Naveen KumarProduction Manager / Application Support ManagerCommented:
Before creating a table, you would have connected to the database using a database username right. That would be the username in which you have created the table.
0
 
Naveen KumarProduction Manager / Application Support ManagerCommented:
default tablespace -> check in dba_users with the below query

select default_tablespace from dba_users
where username='SCOTT'
0
 
Steve WalesSenior Database AdministratorCommented:
If you don't specify an owner, the table is owned by who ever who are connected to the database as.

Type "show user" to see who you are connected as (if in sqlplus).

Each user has a default tablespace assigned when the user is created.  If no tablespace is specified in the create table statement, that tablespace is used.

select default_tablespace from dba_users where username = 'YOUR_OWNER_NAME';
0
 
Steve WalesSenior Database AdministratorCommented:
Further to my above, if not using sqlplus (TOAD or some other tool) you can also do this to see your connected username:

SELECT sys_context('USERENV', 'SESSION_USER') FROM DUAL;
0
 
dev_dbaAuthor Commented:
Thank you..
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.