将前缀添加到mysql db中的自动增量 [英] Add Prefix to auto-increment in mysql db

查看:41
本文介绍了将前缀添加到mysql db中的自动增量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的数据库具有表test1. 它具有一个主要ID"Id",该ID是自动递增的. 现在,id的格式为1,2,3. .是否可以将主要ID存储为 PNR1,PNR2,PNR3 ... .等等(具有自动增量).

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).

推荐答案

否.在查询中添加前缀,或使用视图.

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

这篇关于将前缀添加到mysql db中的自动增量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆