0
点赞
收藏
分享

微信扫一扫

mysql插入与主键相同值的另一个字段

GhostInMatrix 2022-09-08 阅读 116
编程语言


insert into users(username,password) values((select auto_increment from information_schema.tables where table_schema ='mytest' and table_name='users'),'123456'

select * from information_schema.tables where table_schema ='mytest' and table_name='users';

INSERT menu (id,name,url,parent_id,`order`) VALUES((select AUTO_INCREMENT from information_schema.tables where  table_name='menu'),'1','4','1',`id`);


举报

相关推荐

0 条评论