Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

T-SQL- What does N' means in rowpattern (xpath)

I cannot understand the xml rowpattern of the following code in T-SQL.

OPENXML(@hDoc, N'//item') 

All the examples that I found in msdn were like /ROOT/Customer, but I don't understand N'//item'

Any ideas?

like image 417
Afshin Moazami Avatar asked Dec 30 '25 18:12

Afshin Moazami


1 Answers

The N before any string in SQL Server marks the string as Unicode.

Essentially, the difference between char/varchar/text and nchar/nvarchar/ntext.

like image 194
Oded Avatar answered Jan 02 '26 09:01

Oded



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!