SQL Server quickly generates SQL additions and deletions to the statement

Source: Internet
Author: User

are you still tapping the code to generate the SQL statement? Are you still having a problem with the SQL statements that were sloppy? Are you still tangled in the idea of how to express complex SQL statements? If your answer is yes, then you're out, come on. Apply SQL Server Resource Manager to quickly generate SQL statements.
First, open SQL Server2008, and in the menu bar "query" drop-down menu, find "design a query in the editor", such as:



in the Query Designer window that opens, add the database table that you want to manipulate.



Right-click the blank part of the added table, click Change Type in the pop-up menu, and then the submenu appears: Select Insert Value, UPDATE, and delete as required.



1, insert the value. In the added table, tick the field where you want to insert the value, add the corresponding parameter value below the table, or add the value you want to insert directly. At this point we will notice that the SQL statement is automatically synchronized in the bottom code box. A SQL statement that inserts a value is generated like this, and of course you want to insert a record directly select all fields OK.



2, update the data table according to the criteria. Select the field you want to update in the action table that you added, and then design the appropriate field values.


3,sql the query statement. Add the corresponding table or before we can add a view to the database first (it is suggested that all the related action table fields under the database can be added to the view, and then as long as there are query statements, you can go to the view to find the corresponding fields.) ), then add the desired table or view in the Query Designer and select the appropriate field to query directly.




4, the deletion of records is also the case, no longer explained in detail.



seeing this, will you be bothered by a series of SQL statement problems?
make full use of the experience of predecessors, always stand on the shoulders of giants to learn, can greatly improve our learning confidence and learning efficiency. There are a lot of knowledge and wealth to wait for us to explore, together refueling Bar ~ ~ ~
Related Article

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.