Chamomile Wiki
SQL tools for documentation, error handling, logging, and testing.
Brought to you by:
kelightsey
use [chamomile];
go
if object_id(N'[utility].[state]',
N'V') is not null
drop view [utility].[state];
go
create view [utility].[state]
as
select [id] as [id],
[country] as [country],
[state] as [state],
[abbreviation] as [abbreviation]
from [utility_secure].[state];
go
-------------------------------------------------
-- or
-------------------------------------------------
if exists
(select count(*)
from sys.synonyms
where [name] = N'state'
and object_schema_name([object_id]) = N'utility')
drop synonym [utility].[state];
go
create synonym [utility].[state] for [utility_secure].[state];
go
copyright Katherine Elizabeth Lightsey 1959-2013 (aka; my life)
"A man who views the world the same at fity as he did at twenty has wasted thirty years of his life." - Muhammad Ali
"A synonym is a word you use when you can't spell the other one." - Baltasar Gracián