【发布时间】:2011-07-07 21:56:03
【问题描述】:
我尝试在同一查询的多个表中搜索insert 信息的方法,但发现不可能?
所以我想通过简单地使用多个查询来insert它;
INSERT INTO users (username, password) VALUES('test', 'test')
INSERT INTO profiles (userid, bio, homepage) VALUES('[id of the user here?]','Hello world!', 'http://www.stackoverflow.com')
但是我怎样才能将id 从users 自动递增到profile 表的“手动”userid?
【问题讨论】:
-
你想了解交易。
标签: mysql