what does the "n'dbname" what does the 'n' stand for and

12,010

"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. "

reference from aspfaq.com

Share:
12,010

Related videos on Youtube

Neo
Author by

Neo

Updated on September 17, 2022

Comments

  • Neo
    Neo over 1 year
    USE [master] 
    GO 
    /****** Object:  Database [assist]    Script Date: 11/13/2010 20:17:49 ******/
    CREATE DATABASE [assist] ON  PRIMARY 
    ( NAME = N'assist', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.THIRD\MSSQL\DATA\assist.mdf' , SIZE = 2304KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
     LOG ON 
    ( NAME = N'assist_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.THIRD\MSSQL\DATA\assist_log.LDF' , SIZE = 504KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
    

    In the above, what do the following terms mean/usage.

    • GO?

    • N' within this statement "NAME = N'assist', FILENAME = N'C:\Program Files"

  • Neo
    Neo over 13 years
    and the remaining "go"?
  • EngineeringSQL
    EngineeringSQL over 13 years
    The keyword GO tells SQL Server to execute the preceding code as one batch. Also, check out mssqltips.com/tip.asp?tip=1216 which explains the ability to add a number after the GO keyword to tell SQL Server (2005+) how many times to execute the batch.