Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
219 views
in Technique[技术] by (71.8m points)

php - Add Prefix to auto-increment in mysql db

I have my database with table test1. It has a primary id "Id" which is auto-increment. Now the id is in the format 1,2,3.. . .Is it possible to store the primary Id as PNR1,PNR2,PNR3 .. . . and so on(with auto-increment).

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

No. Either add the prefix in the query, or use a view instead.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...