|
|
|
SSChampion
        
Group: General Forum Members
Last Login: Friday, May 18, 2007 3:36 PM
Points: 10,040,
Visits: 1
|
|
| Comments posted to this topic are about the item Synonyms
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 2:26 PM
Points: 1,132,
Visits: 663
|
|
Here's a nice intro article on synonyms
http://www.developer.com/db/article.php/3613301
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Tuesday, May 31, 2011 2:32 PM
Points: 491,
Visits: 221
|
|
| Thanks rgriffin. That article was quick and easy to read.
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Monday, July 30, 2012 10:42 AM
Points: 3,434,
Visits: 519
|
|
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
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Tuesday, May 31, 2011 2:32 PM
Points: 491,
Visits: 221
|
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Tuesday, October 18, 2011 12:57 AM
Points: 213,
Visits: 97
|
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Yesterday @ 4:19 PM
Points: 1,878,
Visits: 1,446
|
|
--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
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Yesterday @ 5:48 PM
Points: 7,088,
Visits: 7,143
|
|
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 Que conclure à la fin de tous mes longs propos? C'est que les préjugés sont la raison des sots. (Voltaire, 1756)
|
|
|
|