What is the best column type for URL?

前端 未结 4 2023
清歌不尽
清歌不尽 2020-12-24 01:03

What is the best column type for a URL field for SQL Server?

Type: VARCHAR or NVARCHAR?

Length?

Similar question for MySQL.

4条回答
  •  渐次进展
    2020-12-24 01:32

    For SQL Server, you'll be wanting to use NVARCHAR I'd have thought, as there are plans (if not action already) afoot for non-Roman characters in URLs. I can't really see any problems these days in the extra storage requirements for NVARCHAR over VARCHAR.

提交回复
热议问题