Paste MS Excel data to SQL Server

Bajji picture Bajji · Nov 25, 2008 · Viewed 122.4k times · Source

I have a bunch of rows in Excel that I want to paste into a new table in MS SQL. Is there a simple way ?

Answer

bzlm picture bzlm · Oct 13, 2009

If you have SQL Server Management Studio, you can just Copy from Excel and Paste into the table in Management Studio, using your mouse. Just

  1. Go to the table you want to paste into.
  2. Select "Edit Top 200 Rows".
  3. Right-click anywhere and select Paste.

Before you do this, you must match the columns between Excel and Management Studio. Also, you must place any non-editable columns last (right-most) using the Table Designer in Management Studio.

The whole procedure takes seconds (to set-up and start - not necessarily to execute) and doesn't require any SQL statements.

Regarding empty database tables and SSMS v18.1+.