synonmys

hi,

I know that in sql server there is not SYNONYMS I mean in the same way as Oracle. I can not have for example table name 'abc' and synonyms 'abc' in the same schema. How can I work around this?

thanks,

[228 byte] By [AlessandroCamargo] at [2007-12-24]
# 1

Hi,

SQL Server 2005 introduced the synonyms as a feature. If you are on SQL Server 2000, there is no way to get the feature implemented beside using views to Select other views / tables. Stored procedure to execute other stored procedures, etc.


HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

JensK.Suessmeyer at 2007-10-8 > top of Msdn Tech,SQL Server,Transact-SQL...
# 2

In addition to what Jens said. Why would you want to have table abc in the same schema as a synonym with the same name? Like this?

create schema test
go
create table test.test
(
value int
)
go
create synonym test.test for test.test
go

Not surprisingly, the following error is raised:

Msg 2714, Level 16, State 8, Line 1
There is already an object named 'test.test' in the database.

How, if the names were the same, would you differentiate between them in a query? Does Oracle have some syntax for this?

LouisDavidson at 2007-10-8 > top of Msdn Tech,SQL Server,Transact-SQL...
# 3
First of all, thanks for deleting the double one :-) I know that Oracle does not have a syntax for that, the same object resolution like in SQL Server will take place, leaving you to a unique object name within a schema.

Jens K. Suessmeyer.


http://www.sqlserver2005.de
JensK.Suessmeyer at 2007-10-8 > top of Msdn Tech,SQL Server,Transact-SQL...

SQL Server

Site Classified