简体   繁体   中英

Saving SQL in Visual Studio 2010

有没有办法让Visual Studio 2010将您在SQL编辑器中开发的SQL保存到当前解决方案中?

If you create a query via the "Server Explorer" you wont be able to save it. You have to copy the SQL to a file and save it.

You can add a sql file to any project though - there is no out of the box template for them though. So either create a template yourself, or just add a text file and change the extension to .sql - you get syntax highlighting etc but you don't get the 'visual' designer, you'll have to paste your code into a sever explorer, new query :-(

To me there seem to be quite a few issues with what they've tried to do with DBs and Visual Studio 2010. The Database Project is way way over the top for most SQL work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM