Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What's with the N?

Status
Not open for further replies.

rarich01

Programmer
Oct 22, 2001
14
0
0
US
Every time I have Enterprise Manager auto-generate a Script for one of the databases, it always places an 'N' in front of some the object names:

Eg.: Here's a sample piece.

exec sp_dboption N'Northwind', N'auto update statistics', N'true'
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_tblBatchPayStatements_tblBatches]') ....

I'm wondering why SQL Server does this, and what it means?

Any ideas?
 
It means that the datatype is a unicode data type. in other words, it is using an nvarchar instead of a varchar datatype or an nchar or ntext vice char or text.

Howsomever, if you write the code yourself you can omit these Ns and the query will still run.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top