0

hey guys I've some data in event_name with a community_code = 1 . now I need to add rows to the same data to the table with community_code = 2. instead of adding each row, is it possible to add all the rows with different community_code. please help me out thank you. please look into image for reference.

1
  • Yes his answer works for me go ahead with that. Commented Feb 7, 2022 at 14:15

1 Answer 1

2

You can insert by querying the table and replacing values as needed. For example:

insert into community_comms (id, community_id, event_name) 
select id, 2, event_name
from community_comms
where community_id = 1
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.