Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2005
    Posts
    55

    Unanswered: what does the N mean?

    Hi,

    and sorry if this is a stupid question, but what does the N mean in the following statement, before the '[dbo].[tbl_clients]'?

    IF EXISTS (SELECT * FROM sysobjects WHERE id = OBJECT_ID(N'[dbo].[tbl_clients]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
    Thanks, Justin

  2. #2
    Join Date
    Dec 2002
    Posts
    1,245
    From link...

    Quote Originally Posted by aspfaq
    Why do some SQL strings have an 'N' prefix?
    You may have seen Transact-SQL code that passes strings around using an N prefix. This denotes that the subsequent string is in Unicode (the N actually stands for National language character set). Which means that you are passing an NCHAR, NVARCHAR or NTEXT value, as opposed to CHAR, VARCHAR or TEXT. See Article #2354 for a comparison of these data types.
    Regards,

    hmscott
    Have you hugged your backup today?

  3. #3
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    it's for uNicode


  4. #4
    Join Date
    Aug 2005
    Posts
    55
    Ok, Thanks for your answers.

    Im slowly learning the ins and outs of SQL Server :>

  5. #5
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Rather excitingly, it isn't mandatory but it is more efficient than the engine implicitly converting to unicode.
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •