Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有两个表:notificattins 和 users
我想为 users 表的每条记录插入一条记录到通知表中。
事实上,我想为每个用户添加一个通知。
谁能帮我?
您没有指定表结构,但通常可以这样做
insert into notifications (some_column, other_column) select username, other_column from users