0

The returned structure of an SQL query is: id | label

I've created a table with the same structure, how to insert the returned lines to this new table.

1
  • what RDBMS (mySQL, SQL SErver, Oracle?) syntax for the select into varies by DB. Commented Dec 10, 2014 at 21:34

2 Answers 2

2
INSERT INTO new_table (id, label)
<put select query here>
Sign up to request clarification or add additional context in comments.

Comments

0

insert into SecondTable (id, label) select id, label from OriginalTable;

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.