Reputation: 135
I'm having two tables: notificattins and users
I want to insert one record into the notifications table for every record of the users table.
in fact i want to add one notification for every user to receive.
can anyone help me?
Upvotes: 1
Views: 411
Reputation: 204756
You did not specify your table structure but generally you can do this
insert into notifications (some_column, other_column)
select username, other_column
from users
Upvotes: 1