Results 1 to 3 of 3

Thread: SQL 2000 create table model

  1. #1
    Join Date
    Feb 2004
    Posts
    12

    SQL 2000 create table model

    Hi all, in the Create Table basic template of the SQL Query Analyzer, can someone explain me what does it means the " N " near the table name in the condition to establish if the table must be dropped?
    Code:
    IF EXISTS(SELECT name 
    	  FROM 	 sysobjects 
    	  WHERE  name = N' table_name, sysname, test_table>' 
    	  AND 	 type = 'U')
        DROP TABLE <table_name, sysname, test_table>
    GO
    
    CREATE TABLE <table_name, sysname, test_table> (
    <column_1, sysname, c1> <datatype_for_column_1, , int> NULL, 
    <column_2, sysname, c2> <datatype_for_column_2, , int> NOT NULL)
    GO
    Thank you

  2. #2
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    It simply mean use Nvarchar/Nchar.

    example


    select datalength(N'All')
    select datalength('All')

  3. #3
    Join Date
    Feb 2004
    Posts
    12
    thank you very much

Posting Permissions

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