Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Synonym table relationship
Mark Burns wrote:
> I have a synonym(in user2 schema)referring to a table in user1
> schema. If I drop the table in user1 and then recreate it with
> different structure(i.e. change columns), will I have to also recreate
> the synonym?
> I thought that the synonym was dynamic and so if the table underneath
> was changed then it should not make a difference. Is this true? Is the
> structure of the synonym saved?, I thought it was more like a pointer
> to the table.
>
> thanks
> Mark
Synonyms don't contain columns. They are just an alias. A synonym couldn't care less what the structure of a table may be.
In fact you can try this test.
Log on as schema1
Create table zzz
Grant select on zzz to schema2
Log on as schema2
Create a synonym to zzz
Log on as schema1
Drop table zzz
Create view zzz based on any other table
Log on as schema2
Select from the previously created synonym.
It doesn't even care if it becomes a different object type.
Daniel Morgan Received on Wed May 22 2002 - 10:07:07 CDT
![]() |
![]() |