Home > Backend Development > PHP Tutorial > Unreasonable design of querying and modifying data in SQL Server 2005_PHP Tutorial

Unreasonable design of querying and modifying data in SQL Server 2005_PHP Tutorial

WBOY
Release: 2016-07-13 17:02:48
Original
864 people have browsed it

In SQL Server 2000, we want to modify data directly in the database table. The general operation method is: in SQL Server Enterprise Management, select the corresponding table, right-click, select "Query" in "Open Table", and Enter the SQL statement in the editing window to find the record to be modified, and then directly modify the corresponding field in the result window.
So what do you need to do in SQL Server 2005?
In SQL Server Management Studio, find the corresponding table, right-click, select "Open Table", then click the "Show Sql Pane" button, enter the SQL statement in the Sql Pane window to find the record to be modified, and then in the results Modify the corresponding fields directly in the window.
Maybe you think there is no difference in the operation of SQL Server 2005 and SQL Server 2000.
But the problem lies in selecting "Open Table". When "Open Table", SQL Server Management Studio will perform the query operation of all records in the table. If there is a lot of data in the table, there will be a waiting time for the query. You will be annoyed by this wait, because you just want to modify a certain record, and this query is simply redundant. There is also "Open Table" in SQL Server 2000, which also queries all records, but SQL Server 2000 also provides a "query" operation, which is the operation method mentioned at the beginning of the 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 also inconvenient to operate through "Update to", because in most cases, you have to look at the original data before modifying the data. If you update directly, unexpected modifications may be made due to incorrect conditions entered in the SQL statement.
I have just come into contact with SQL Server r2005. Maybe SQL Server 2005 provides other convenient operation methods, but I didn't find it. If you know, you are welcome to tell me.
Source: dudu-Happy Programmer


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/631025.htmlTechArticleIn SQL Server 2000, we want to modify data directly in the database table. The general operation method is: in SQL In Server Enterprise Management, select the corresponding table, right-click, and select "Open Table...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template