Syntax meaning

  • Let's look at this statment :

    SELECT name

    FROM sysobjects

    WHERE name = N'<table_name, sysname, test_table>'

    AND type = 'U'

     

    I would like to know the meaning of :

    - N' (name=N'...)

    - the syntaxe : N'<table_name, sysname, test_table'> , why/when this form is used.

    Why not simply : name='test_table'

     

    Thanks a lot in advance

  • sofiane,

    N'  means you are going to use a unicode version of the string. Is usually required by nchar,nvarchar and ntext types. (btw sysname = nvarchar(128) )

    the systax means: <semantical meaning, type, example> with

    your 'name = test_table' you won't be able to know the TYPE or The  object meaning of "name" you are just using the example part.

    HTH

     

     


    * Noel

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply