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

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/boom_man/article/details/78126972
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`);
阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页