Solved

SELECT empid, firstname + N' ' + lastname AS fullname

Posted on 2015-02-07
1
126 Views
Last Modified: 2015-02-07
Is Query 1 the same as Query 2?

What is the role of N in Query 2?  Does it have something to do with using non-English characters in the last name?
Query 1:
SELECT empid, firstname + ' ' + lastname AS fullname
FROM HR.Employees;

Query 2:
SELECT empid, firstname + N' ' + lastname AS fullname
FROM HR.Employees;

Open in new window

0
Comment
Question by:Mike Eghtebas
1 Comment
 
LVL 22

Accepted Solution

by:
Steve Wales earned 500 total points
ID: 40596468
The N is used for Unicode strings.

See this Knowledge Base article on the subject:

http://support.microsoft.com/kb/239530
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now