Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What does the N do in sp_attach_db?

Status
Not open for further replies.

tsinvr

Technical User
Jan 20, 2002
7
US
This is probably a silly question, but I can not find the answer.

In the sp_attach_db command the books on line samples show that you put an N infront of variables, like this:

EXEC sp_attach_db @dbname = N'FIRE',
@filename1 = N'c:\Fire_RMS\FIRE.mdf'

What does the N mean?

Thanks.

Ted

 
An N in front of a string signifies unicode text.

--James
 
Ted,

What 'books'? I haven't seen that requirement in the SQL Server Books OnLine and I've never had to use the N' in a variable. As James says, that indicates unicode.

I have seen examples that show it for file paths, such as used in your last variable (N'C:\Fire_RMS\FIRE.mdf').

-SQLBill

Posting advice: FAQ481-4875
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top