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


Synonyms


Synonyms

Author
Message
Site Owners
Site Owners
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: Administrators
Points: 12749 Visits: 26
Comments posted to this topic are about the item Synonyms
Bob Griffin
Bob Griffin
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

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

http://www.developer.com/db/article.php/3613301
Jeff Deluca
Jeff Deluca
SSChasing Mays
SSChasing Mays (657 reputation)SSChasing Mays (657 reputation)SSChasing Mays (657 reputation)SSChasing Mays (657 reputation)SSChasing Mays (657 reputation)SSChasing Mays (657 reputation)SSChasing Mays (657 reputation)SSChasing Mays (657 reputation)

Group: General Forum Members
Points: 657 Visits: 229
Thanks rgriffin. That article was quick and easy to read.
Yelena Varshal
Yelena Varshal
SSCrazy Eights
SSCrazy Eights (9.2K reputation)SSCrazy Eights (9.2K reputation)SSCrazy Eights (9.2K reputation)SSCrazy Eights (9.2K reputation)SSCrazy Eights (9.2K reputation)SSCrazy Eights (9.2K reputation)SSCrazy Eights (9.2K reputation)SSCrazy Eights (9.2K reputation)

Group: General Forum Members
Points: 9242 Visits: 601
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
SSChasing Mays
SSChasing Mays (657 reputation)SSChasing Mays (657 reputation)SSChasing Mays (657 reputation)SSChasing Mays (657 reputation)SSChasing Mays (657 reputation)SSChasing Mays (657 reputation)SSChasing Mays (657 reputation)SSChasing Mays (657 reputation)

Group: General Forum Members
Points: 657 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
Old Hand
Old Hand (357 reputation)Old Hand (357 reputation)Old Hand (357 reputation)Old Hand (357 reputation)Old Hand (357 reputation)Old Hand (357 reputation)Old Hand (357 reputation)Old Hand (357 reputation)

Group: General Forum Members
Points: 357 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
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10659 Visits: 5158
--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
One Orange Chip
One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)

Group: General Forum Members
Points: 26569 Visits: 12506
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