Menu

utility.state

Katherine E. Lightsey
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


Related

Wiki: test_driven_development_example

MongoDB Logo MongoDB
Gen AI apps are built with MongoDB Atlas
Atlas offers built-in vector search and global availability across 125+ regions. Start building AI apps faster, all in one place.