In the afternoon, a table structure was exported from the production library to test for some problems, because the production library is connected to a table under other users, so by simulating it locally through the view, the view is created:
Create or Replace view csews as SELECT * from Order_list;
But it appears that Ora-00955:name is already the error of used by an existing object,
On the internet to find out that the database has the same name object, so query
SELECT * from all_objects where object_name= ' csews ';
But no record, very crazy, looking for a long time did not find a solution, and finally in the table structure file search
csews actually searched for such a statement:
Create or replace synonym csews for p3dbo. Csews;
It dawned on me that I had created a synonym.
The synonym is then deleted:
Drop public synonym csews;
Then re-execute:
Create or Replace view csews as SELECT * from Order_list;
The view is built successfully.
But think carefully, select * from all_objects where object_name= ' csews ';
This statement should be able to find out, because I have another user under this view but why did not find out, so there is a csews to capitalize on the next query:
SELECT * from all_objects where object_name= ' csews ';
The results of the query came out, then understand the original to capitalize. If I had known it would not have wasted so much time, but who let me be rookie level, hereby record,
Avoid making similar mistakes again next time!
Note: After Oracle's lexical analysis, it will turn lowercase into uppercase, direct capitalization reduces the time of the compilation process, so capitalization is a good habit!
Oracle:ora-00955:name is already used by an existing object