user788487
user788487

Reputation: 259

Data type for an ID field (int or varchar)

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

Answers (1)

Balanivash
Balanivash

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

Related Questions