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

sysadmin1138
  • 133,124
  • 18
  • 176
  • 300
user48642
  • 289
  • 2
  • 4
  • 10

1 Answers1

9

"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

EngineeringSQL
  • 275
  • 1
  • 2
  • 8
  • and the remaining "go"? – user48642 Nov 13 '10 at 16:01
  • 1
    The keyword GO tells SQL Server to execute the preceding code as one batch. Also, check out http://www.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. – EngineeringSQL Nov 13 '10 at 16:23