SQL Prompt 5.1 uses

Source: Internet
Author: User
Tags svn visual studio 2010

1) Smart Tips

The smart tips for SQL prompt are very sensitive, much better than the R2 comes with. When entering a keyword, even if you enter lowercase, it will automatically convert you to uppercase (in fact all SQL keyword capitalization is a more canonical way of writing), do not need to write the keyword and the normal word back and forth to switch the CAPS LOCK key.

In addition to the Code intelligence hints, it also provides smart hints for table definitions. Maybe you have a big table, but some fields you can't remember clearly, you don't have to go to Server Explorer on the left side of SQL Server to see the table structure.

2) SQL code formatting

Before formatting:

CREATEDATABASETestGouseTestGOCREATETABLEEmployees (IdIntIDENTITYPRIMARYKEY,EmployeeName NVARCHAR (100),EntryDateDATE)GOCREATETABLEUsers (IdIntIDENTITYPRIMARYKEY,UserName NVARCHAR (100),Genderchar (1), birhdate datetime,employeeid  int) goselect u.username, e.employeename from dbo. Users uinner join dbo.employees e on e.id = u.employeeid     

After formatting:

CREATEDATABASETestGouseTestGOCREATETABLEEmployees (IdIntIDENTITYPRIMARYKEY,EmployeeName NVARCHAR (100),EntryDateDATE)GOCREATETABLEUsers (IdIntIDENTITYPRIMARYKEY,UserName NVARCHAR (100),Genderchar (1), birhdate DATETIME, employeeid  INT) goselect u.username, e.employeenamefrom dbo. Users u inner join dbo.employees e on e.id = u.employeeid     

If you write a large segment of stored procedures or try, using SQL prompt formatting can save us a lot of time.

4. Using the soruce Control in SQL Server

SQL prompt provides a version controller of the database, and after I try to use this feature, I have to say that this is a really good feature.
The addition and alteration of tables, views, stored procedures, and functions in a database can be managed without having to fill out an Excel document record database change point every time the change is made.

The following pictures are a simple tutorial.

1) Click Link Database to Source control
It provides several interfaces connected to the source control, where I choose SVN as the database version controller.

2) Input SVN address and Development mode, development mode I chose multi-person sharing mode

The connected address and database are displayed when the connection is successful

3) Changing database operations
When I change the structure of the Users table, the users table will appear with a small blue icon indicating that the table has been changed and can do a commit operation.

There is a commit command in the table's right-click menu

Now to commit it, it will prompt you to change the table structure (I have added an address column to the Users table), click on the Commit button in the upper-right corner to submit

4) View History

I've made changes to the table before, and View history is a very important feature of versioning, now to verify that it works for the database.

Right-click->show history

There is a clear contrast between the front and back versions

5. Using SQL Prompt in Visual Studio

On the official website, it is clear that SQL prompt can only be used in database project or SQL Server project.

Using SQL Prompt with Visual Studio

SQL Prompt can integrated with Visual Studio 2005, and 2010. SQL Prompt only works in Database projects and SQL Server projects.

When we're doing a project, we can create a matching database project for our project to manage our tables, views, stored procedures, and other database scripts.
We are unable to use SQL prompt in general projects.

When we have created SQL Server project or database project, we can use it.

In the ointment, after many trials, I failed to use SQL prompt in Visual Studio 2010, the system is win 7 64-bit, and you need to verify whether it is available under the 32-bit Win7 system.

By the way the error is posted:

Even if the solution provided by the official website is not resolved (register TextMgrP.dll file)

SQL Prompt 5.1 uses

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.