I'm attempting to choose a few fields from one table and supplement them into an existing table from a stored procedure. Here is the thing that I am attempting:
SELECT col1, col2
INTO dbo.TableTwo
FROM dbo.TableOne
WHERE col3 LIKE @search_key
I think
SELECT ... INTO ...
is for temporary tables which is why I get an error that
dbo.TableTwo
already exists.
How can I insert multiple rows from
dbo.TableOne
into
dbo.TableTwo
?