Tshering Wangchuuk
Tshering Wangchuuk

Reputation: 11

how to add the auto increment number after file number (file number is a attribute of a table)

i have a table called dispatch which contains attributes like file name, subject and so on. what i want as output is data of file-name/auto-increment-num. EG: MD/ICT/2018/1 and next value will be like MD/ICT/2018/2 and so on..

MD/ICT/2018/1 and next value will be like MD/ICT/2018/2 and so on..

Upvotes: 0

Views: 94

Answers (1)

xenon
xenon

Reputation: 90

I think there to way to make it happen or consider.

  1. maybe if the year changes need also to reset count back to 1.

    • for the case need to check currect year search and count the record increment but 1 before insert the record.
  2. if ever no delete function or consideration count per year just use auto_increment as basis of numbering.

Upvotes: 2

Related Questions