SYNONYM (Transact-SQL)

nuova istruzione in t-sql (dalla versione sql server 2005) consente di semplificare la scrittura di query.
Quando occorre far riferimento ad un oggetto che si trova su di un'altro db occorre usare questa dicitura

[[[server.][database].][schema_name].]object_name

.. insomma a volte un po' lunghina, per ovviare a questo si usano i SYNONYM: CREATE SYNONYM [schema_name.]synonym_name FOR object_name

Esempio

CREATE SYNONYM ProdCat
FOR AdventureWorks.Production.ProductCategory

SELECT * FROM ProdCat

posted @ mercoledì 17 gennaio 2007 10:34

Print

Comments on this entry:

# re: SYNONYM (Transact-SQL)

Left by he at 13/11/2014 17:38
Gravatar
rapidly provides mobile check your credit score major director huge credit report scores impact adaptability 547

# re: SYNONYM (Transact-SQL)

Left by http://www.verdiemilano.it at 27/08/2015 14:41
Gravatar
Sorry, but this comment is a duplicate of another comment. Duplicate comments are not allowed.
Comments have been closed on this topic.
«novembre»
domlunmarmergiovensab
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567