Looking at an if exists statement created by SQL Enterprise Manager such as:
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[DeleteAllData]') and OBJECTPROPERTY(id, N'IsProcedure') =
1), what does the N do? I've seen cases where it is and isn't necessary, but
I cannot find documentation telling what it does. "N" is a very ineffective
search!!!The N represents a Unicode string.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
"CR" <c@.home.com> wrote in message
news:%23DDNZixYGHA.4424@.TK2MSFTNGP05.phx.gbl...
Looking at an if exists statement created by SQL Enterprise Manager such as:
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[DeleteAllData]') and OBJECTPROPERTY(id, N'IsProcedure') =
1), what does the N do? I've seen cases where it is and isn't necessary, but
I cannot find documentation telling what it does. "N" is a very ineffective
search!!!|||See the Books Online topic 'Server-side Programming with Unicode'
(http://msdn2.microsoft.com/en-us/library/ms191313(SQL.90).aspx).
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
"CR" <c@.home.com> wrote in message
news:%23DDNZixYGHA.4424@.TK2MSFTNGP05.phx.gbl...
> Looking at an if exists statement created by SQL Enterprise Manager such
> as: if exists (select * from dbo.sysobjects where id =
> object_id(N'[dbo].[DeleteAllData]') and OBJECTPROPERTY(id, N'IsProcedure')
> = 1), what does the N do? I've seen cases where it is and isn't necessary,
> but I cannot find documentation telling what it does. "N" is a very
> ineffective search!!!
>
No comments:
Post a Comment