Unreasonable design for querying and modifying data in SQL Server 2005

Source: Internet
Author: User
Tags management studio sql server management sql server management studio
In SQL Server 2000, we want to modify data directly in the database table. The general operation is: in SQL Server Enterprise Management, select the corresponding table, right-click, select "query" in "Open Table", enter an SQL statement in the SQL edit window to find the record to be modified, and then modify the corresponding field in the result window.
In SQL Server 2005, what should I do?
In SQL Server Management Studio, right-click the corresponding Table, select "Open Table", and click "Show SQL Pane, enter the SQL statement in the SQL Pane window to find the record to be modified, and then modify the corresponding field in the result window.
You may think that SQL Server 2005 and SQL Server 2000 operations are no different.
However, when "Open Table" is selected, SQL Server Management Studio queries all records in the Table when "Open Table" is selected. If the Table contains a large amount of data, there will be a waiting time, and you will be annoyed with this wait, because you just want to modify a record, this query is unnecessary. In SQL Server 2000, "Open Table" is also used to query all records. However, SQL Server 2000 also provides "query" operations, which are the operation methods described at the beginning of this article.
You may say that SQL Server Management Studio provides the "Script Table as" operation, but the results of the Select To query through Script Table as are read-only and cannot be modified. It is not convenient to perform operations through "Update to", because in most cases, you need to check the original data before modifying the data. If you Update the SQL statement directly, it may be because the SQL statement has incorrect conditions and the modification is not expected.
I also just got in touch with SQL Serve r2005. Maybe SQL Server 2005 provides other convenient operations, but I didn't find them. If you know, please let me know.
Source: dudu-happy programmer


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.