It's maybe a noob question but I found some T-SQL query example to verify database size with SELECT
and WHERE
clause here
Here is the code:
SELECT name, size, size*1.0/128 AS [Size in MBs]
FROM sys.master_files
WHERE name = N'mytest';
My question is what does the N
prefix mean in the WHERE name = N'keyword'
clause?
I always use WHERE name = 'keyword'
before, and I don't find the differences (you can try it by yourself).
I've googled that but I don't know the keyword I supposed to search
It's declaring the string as nvarchar data type (Unicode), rather than varchar (8-bit encoding, including ASCII).
FYI, this is a duplicate of the question: What is the meaning of the prefix N in T-SQL statements?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With