Q
Q
Quambaras2022-01-06 19:19:50
SQL
Quambaras, 2022-01-06 19:19:50

How to fill an empty table with data using a one-to-one relationship?

There is an empty table that is related to another table (not empty) one to one. How can you write a query to fill an empty table with data so that all records are related to another - not empty - table?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
galaxy, 2022-01-06
@Quambaras

INSERT INTO tab1 (id, enum_field)
SELECT id, 'opt1'
  FROM tab2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question