SQL Server to Excel – How to Export a Database Schema from SSMS?

excelsql serversql server 2014ssms

As part of a web migration process, a vendor has asked for our database schema without the data records (for confidential purposes). They want a MS Excel file with each database table. I am completely new to working with databases. Is there an easy way to do this in SQL Server 2014 Management Studio?

Best Answer

You can link your server as Data Source in Excel and then run this query:

SELECT * FROM information_schema.tables WHERE TABLE_TYPE='BASE TABLE'

This will export data into Excel

How to connect SQL server to Excel: https://support.office.com/en-us/article/Connect-a-SQL-Server-database-to-your-workbook-22c39d8d-5b60-4d7e-9d4b-ce6680d43bad

Or if database is not that big then just run it in Management Studio and copy-paste the result to Excel