2

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?

migrated from stackoverflow.com Sep 3 '16 at 8:03

This question came from our site for professional and enthusiast programmers.

  • Out of interest, why did they need this in Excel? – David Atkinson Sep 2 '16 at 21:25
5

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

  • Hi the.Legend, thank you for this answer! I think this points me in exactly the right direction! – Default42 Sep 2 '16 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy