If Table A and B have identical structures (except ID field). In A its autoassigned, but in B it is expecting the value from an insert.
How can I do a INSERT INTO A (select * from B).
What is the quickest, most flexible SQL that can run in a stored proc.
Specify the columns explicitly:
INSERT INTO TableA (col1, col2)
SELECT col1, col2 FROM TableB
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With