In the dbo.AspNetUsers
table used by ASP.NET Core Identity the Id
column is defined as nvarchar(450)
as seen in the image below.
What is the reason for this, since Guids are stored in this column? If I am creating a foreign key referencing this Id
column I don't really want to make the column unnecessarily large. Or is there a scenario when Id
column of this size would be needed?
I have no idea why it's 450 in length, but it actually doesn't matter. The NVARCHAR type is dynamically sized, so the the number it's fed is actually a max length. It will only consume the amount of bytes necessary to store the data it's storing, regardless of the "length".
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