问题
What is advisable data type of an ID field (such as state ID or web_form_id or employeeID)? Is it best to use an int data type of varchar (and why) ?
回答1:
For an Id, which is going to be unique to each user, its recommended to go with int
, and as this sounds more like an sql question, in the auto_increment
mode.
来源:https://stackoverflow.com/questions/6554630/data-type-for-an-id-field-int-or-varchar