-1

Hi i have a table name student like below

student(student_id, name, dateofbirth, email, password);

the student_id field is auto incremented. I am trying to find an option or way to add a prefix "s_" to my student_id field but I cant seem to. Is it not possible on database application on PHPMyADMIN ?? Thank you.

Sanjok Gurung
  • 948
  • 4
  • 17
  • 33
  • Possibly duplicate of http://stackoverflow.com/questions/5991148/add-prefix-to-auto-increment-in-mysql-db – Rahul Kaushik May 07 '14 at 13:29
  • Possible duplicate of [Add Prefix to auto-increment in mysql db](https://stackoverflow.com/questions/5991148/add-prefix-to-auto-increment-in-mysql-db) – Keyur May 23 '18 at 07:52

1 Answers1

1

The auto increment field can be ONLY integer of value. Placing an s_ is not possible. Either add the prefix in the MySQL query, or use a view, or you can use another column instead.

Bud Damyanov
  • 30,171
  • 6
  • 44
  • 52