What does 'N' means in this transact-SQL statement?

Posted on 2005-05-01
Last Modified: 2006-11-18

I got these statements in an example of SELECT in MS SQL:

if exists (SELECT * from dbo.sysobjects WHERE id = object_id(N'dbo.employee') and OBJECTPROPERTY(id, N'IsUserTable')=1)
drop table dbo.employee

There exists an 'N' inside the above statement, I tried to figure out what it is, but I couldn't.

If you know, please help. Thanks


Question by:rfr1tz
    LVL 75

    Accepted Solution

    It inidicates the character string is unicode (supports double byte character languages).
    LVL 75

    Expert Comment

    by:Anthony Perkins
    Take a look at the definition of OBJECT_ID:

    Returns the database object identification number.

    OBJECT_ID ( 'object' )


    Is the object to be used. object is either char or nchar. If object is char, it is implicitly converted to nchar.

    Notice how it supports the nchar data type.  nchar is a unicode datatype.
    LVL 75

    Expert Comment

    by:Anthony Perkins
    Also, as friendly reminder please maintain your many abandoned questions.  Here are listed all your open questions:

    1 02/27/2005 250 Why Red Hat Linux Pro 9.0 no loner recog...  Open Linux Setup
    2 03/18/2005 250 I want to download all the microsoft upd...  Open Windows 2000
    3 03/22/2005 500 Lost in a maze of Cisco flexibility  Open Networking
    4 04/04/2005 500 Approximate power budget for satellite c...  Open Networking
    5 04/27/2005 125 Text marked with "Do not check spelling ...  Open Microsoft Word
    6 04/30/2005 250 How to create a script to change content...  Open Microsoft SQL Server
    7 05/01/2005 250 What does 'N' means in this transact-SQL...  Open Microsoft SQL Server
    8 06/22/2004 250 How to define CONFIG_CRYPTO_HMAC inkerne...  Open Linux Setup
    9 08/06/2004 250 How to make nslookup works without dns s...  Open Linux Setup


    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    In this article—a derivative of my blog post (—I will explore a few different perspectives on which week today's date falls within using Microsoft SQL Server. First, to frame this stu…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
    Via a live example, show how to shrink a transaction log file down to a reasonable size.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now