您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

mysql 请教大神关于插入自增id问题

2024/2/21 6:14:36发布15次查看
mysql
mysql : insert into a(name,age,coun) values('小王','10','xxx+本条自增id');
insert into b(class) value('test');
insert into c(aid,bid) values('aid','bid');
执行三条插入语句;
问题来了:1、“xxx+本条自增id” xx为字符串 ;
2、'aid','bid' 分别为上面前两条插入语句的id;
具体怎么写,select last_insert_id()、show table status 如何嵌套使用,请指点,鞠躬感谢!
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product