SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Synonyms


Synonyms

Author
Message
Bob Griffin
Bob Griffin
Ten Centuries
Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)

Group: General Forum Members
Points: 1371 Visits: 702
Here's a nice intro article on synonyms

http://www.developer.com/db/article.php/3613301
Jeff Deluca
Jeff Deluca
Mr or Mrs. 500
Mr or Mrs. 500 (567 reputation)Mr or Mrs. 500 (567 reputation)Mr or Mrs. 500 (567 reputation)Mr or Mrs. 500 (567 reputation)Mr or Mrs. 500 (567 reputation)Mr or Mrs. 500 (567 reputation)Mr or Mrs. 500 (567 reputation)Mr or Mrs. 500 (567 reputation)

Group: General Forum Members
Points: 567 Visits: 229
Thanks rgriffin. That article was quick and easy to read.
Yelena Varshal
Yelena Varshal
SSCarpal Tunnel
SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)

Group: General Forum Members
Points: 4558 Visits: 595
My RTM BOL says:
The following table contains a list of these statements and expression contexts.
SELECT
INSERT
UPDATE
DELETE
EXECUTE
Sub-selects
DML and DDL statements that appear inside Dynamic SQL.1
1 Synonyms cannot be used with Full-Text DDL.

So it says that DDL can be used but not full-text one


Regards,
Yelena Varshal

Jeff Deluca
Jeff Deluca
Mr or Mrs. 500
Mr or Mrs. 500 (567 reputation)Mr or Mrs. 500 (567 reputation)Mr or Mrs. 500 (567 reputation)Mr or Mrs. 500 (567 reputation)Mr or Mrs. 500 (567 reputation)Mr or Mrs. 500 (567 reputation)Mr or Mrs. 500 (567 reputation)Mr or Mrs. 500 (567 reputation)

Group: General Forum Members
Points: 567 Visits: 229
Yelena Varshal,
My coworker's BOL said the same thing that yours did.
My BOL did not say that. We checked our versions and his is
older than mine. My BOL page says:
Updated: 14 April 2006

at the top.
Maybe that's what they removed in the updated version?


PS
This is they BOL page we were both on just for comparison for anyone else.

BOL: ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/c3d3f14f-4cc1-465c-89b6-0299f7e77bc0.htm

Online: http://msdn2.microsoft.com/en-us/library/ms190626.aspx
HardCoder
HardCoder
SSC Veteran
SSC Veteran (239 reputation)SSC Veteran (239 reputation)SSC Veteran (239 reputation)SSC Veteran (239 reputation)SSC Veteran (239 reputation)SSC Veteran (239 reputation)SSC Veteran (239 reputation)SSC Veteran (239 reputation)

Group: General Forum Members
Points: 239 Visits: 103
I could not understand this question clearly.
May be someone please elaborate this.

Mohammad Irfan
http://matespoint.blogspot.com
http://www.irfit.com
Igor Micev
Igor Micev
SSCertifiable
SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)SSCertifiable (5.9K reputation)

Group: General Forum Members
Points: 5860 Visits: 5080
--SQL 2012
CREATE TABLE [dbo].[test](
[i] [int] NULL
)
CREATE SYNONYM [dbo].[testSinonim] FOR [mytestdb].[dbo].[test]
GO
Alter table test
Add j int null
--================
After scripting the table, the result is following
CREATE TABLE [dbo].[test](
[i] [int] NULL,
[j] [int] NULL
)

I just want to say the question is not valid for upper versions of SQL 2005.

Regards

Igor Micev,
SQL Server developer at Seavus
My blog: www.igormicev.com
TomThomson
TomThomson
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14224 Visits: 12197
IgorMi (4/1/2012)
--SQL 2012
CREATE TABLE [dbo].[test](
[i] [int] NULL
)
CREATE SYNONYM [dbo].[
] FOR [mytestdb].[dbo].[test]
GO
Alter table test
Add j int null
--================
After scripting the table, the result is following
CREATE TABLE [dbo].[test](
[i] [int] NULL,
[j] [int] NULL
)

I just want to say the question is not valid for upper versions of SQL 2005.

Regards


The question isn't about

Alter table test
Add j int null

but about

Alter table testSinonim
Add j int null

It's about using the synonym, not about using the original table name.

Tom

TomThomson
TomThomson
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14224 Visits: 12197
crussell-931424 (9/25/2014)
I guess even the BOL has to fix a mistake now and then.

That "even" suggests you haven't noticed how often BOL is wrong :-D.

Tom

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search