Reputation: 259
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) ?
Upvotes: 3
Views: 4634
Reputation: 6867
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.
Upvotes: 3