I have to store file paths in a DB field (/tmp/aaa/bbb
, C:\\temp\\xxx\\yyy
, etc.). I can\'t really tell how long they could be.
Given this
The Length of a file path cannot be predicted. It could be very short as 'C:\'
or could be very lengthy like 'C:\Program Files\Microsoft SQL Server\110\LocalDB\Binn\Resources\1033'
or even more. But in database level there is no harm using something like VARCHAR(MAX)
See Maximum size of VARCHAR(MAX)