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


Synonyms


Synonyms

Author
Message
Site Owners
Site Owners
SSCoach
SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)

Group: Administrators
Points: 18513 Visits: 218
Comments posted to this topic are about the item Synonyms
Bob Griffin
Bob Griffin
Hall of Fame
Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)

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

http://www.developer.com/db/article.php/3613301
Jeff Deluca
Jeff Deluca
Right there with Babe
Right there with Babe (793 reputation)Right there with Babe (793 reputation)Right there with Babe (793 reputation)Right there with Babe (793 reputation)Right there with Babe (793 reputation)Right there with Babe (793 reputation)Right there with Babe (793 reputation)Right there with Babe (793 reputation)

Group: General Forum Members
Points: 793 Visits: 229
Thanks rgriffin. That article was quick and easy to read.
Yelena Varshal
Yelena Varshal
SSCoach
SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)

Group: General Forum Members
Points: 18608 Visits: 608
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
Right there with Babe
Right there with Babe (793 reputation)Right there with Babe (793 reputation)Right there with Babe (793 reputation)Right there with Babe (793 reputation)Right there with Babe (793 reputation)Right there with Babe (793 reputation)Right there with Babe (793 reputation)Right there with Babe (793 reputation)

Group: General Forum Members
Points: 793 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
Say Hey Kid
Say Hey Kid (675 reputation)Say Hey Kid (675 reputation)Say Hey Kid (675 reputation)Say Hey Kid (675 reputation)Say Hey Kid (675 reputation)Say Hey Kid (675 reputation)Say Hey Kid (675 reputation)Say Hey Kid (675 reputation)

Group: General Forum Members
Points: 675 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
SSCoach
SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)

Group: General Forum Members
Points: 19604 Visits: 5191
--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,
My blog: www.igormicev.com
Tom Thomson
Tom Thomson
SSC Guru
SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)SSC Guru (50K reputation)

Group: General Forum Members
Points: 50344 Visits: 13150
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

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