<p>I have two identical tables and need to copy rows from table to another. What is the best way to do that? (I need to programmatically copy just a few rows, I don't need to use the bulk copy utility).</p>

[{'answer_id': 57172, 'author': 'Jarrett Meyer', 'author_id': 5834, 'author_profile': 'https://Stackoverflow.com/users/5834', 'pm_score': 3, 'selected': False, 'text': '<pre><code>SELECT * INTO &lt; new_table &gt; FROM &lt; existing_table &gt; WHERE &lt; clause &gt;\n</code></pre>\n'}, {'answer_id': 57188, 'author': 'Scott Nichols', 'author_id': 4299, 'author_profile': 'https://Stackoverflow.com/users/4299', 'pm_score': 8, 'selected': True, 'text': '<p>As long as there are no identity columns  you  can just   </p>\n\n<pre><code>INSERT INTO TableNew\nSELECT * FROM TableOld\nWHERE [Conditions]\n</code></pre>\n'}, {'answer_id': 57189, 'author': 'Michael Haren', 'author_id': 29, 'author_profile': 'https://Stackoverflow.com/users/29', 'pm_score': 6, 'selected': False, 'text': '<p>Alternative syntax:</p>\n\n<pre><code>INSERT tbl (Col1, Col2, ..., ColN)\n  SELECT Col1, Col2, ..., ColN\n  FROM Tbl2\n  WHERE ...\n</code></pre>\n\n<p>The select query can (of course) include expressions, case statements, constants/literals, etc.</p>\n'}, {'answer_id': 57190, 'author': 'Kaniu', 'author_id': 3236, 'author_profile': 'https://Stackoverflow.com/users/3236', 'pm_score': 3, 'selected': False, 'text': '<pre><code>INSERT INTO DestTable\nSELECT * FROM SourceTable\nWHERE ... \n</code></pre>\n\n<p>works in SQL Server</p>\n'}, {'answer_id': 57198, 'author': 'ScottStonehouse', 'author_id': 2342, 'author_profile': 'https://Stackoverflow.com/users/2342', 'pm_score': 5, 'selected': False, 'text': "<p>Jarrett's answer creates a new table.</p>\n\n<p>Scott's answer inserts into an existing table with the same structure.</p>\n\n<p>You can also insert into a table with different structure:</p>\n\n<pre><code>INSERT Table2\n(columnX, columnY)\nSELECT column1, column2 FROM Table1\nWHERE [Conditions]\n</code></pre>\n"}, {'answer_id': 69256412, 'author': 'Shravya Mutyapu', 'author_id': 12065837, 'author_profile': 'https://Stackoverflow.com/users/12065837', 'pm_score': 0, 'selected': False, 'text': '<p>To select only few rows..This will work like charm..</p>\n<pre><code>SELECT TOP 10 *\nINTO db2.dbo.new_table\nFROM db1.dbo.old_table;\n</code></pre>\n<p>Note : Just create a new table in the required db..We need not define its structure.</p>\n'}]
['https://Stackoverflow.com/questions/57168', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2536/']