Database design : preferred field length for file paths

前端 未结 7 938
南笙
南笙 2021-01-04 02:49

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

7条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-04 03:37

    I would recommend VARCHAR(2048) or even VARCHAR(1024) since file paths are usually not 2000 characters long.

提交回复
热议问题