Creating table in other schema [message #537595] |
Thu, 29 December 2011 12:09 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/7a07969471b42f2a2940bb0a9e7eb3e0?s=64&d=mm&r=g) |
rajubuddha
Messages: 1 Registered: December 2011 Location: India
|
Junior Member |
|
|
Hi Guys ,
I have a query ,
I need to create a structure DATABASE=>SCHEMA=>TABLE as
DB=>SC=>EMPLOYEE ...but after connecting database i could create table only user my user schema(own schema)only .I want to create a new schema called SC as public and need to create a table . Please help me out...
[EDITED by LF: fixed topic title typo; was "Creatingtableinother schema"]
[Updated on: Thu, 29 December 2011 13:15] by Moderator Report message to a moderator
|
|
|
Re: Creatingtableinother schema [message #537602 is a reply to message #537595] |
Thu, 29 December 2011 12:48 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21808 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Create a table in your own schema, and then create a public synonym for this table.
SQL> create table test (col number);
Table created.
SQL> insert into test values (123);
1 row created.
SQL> create public synonym test for test;
Synonym created.
SQL> grant select on test to public;
Grant succeeded.
SQL> connect mike/lion
Connected.
Session altered.
SQL> select * from test;
COL
----------
123
SQL>
[EDIT: fixed an example]
[Updated on: Thu, 29 December 2011 12:53] Report message to a moderator
|
|
|
Re: Creatingtableinother schema [message #537606 is a reply to message #537595] |
Thu, 29 December 2011 12:58 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/102589.gif) |
Michel Cadot
Messages: 68648 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
Quote: want to create a new schema called SC as public
There is no such thing than public account.
An account can create a table in another schema only if he has the CREATE ANY TABLE privilege which is a privilege you should not grant.
If you need it then either you are a DBA either there is a flaw in your design.
Regards
Michel
|
|
|