当我将行插入SQL Server 2005的表将顺序是preserved? [英] When I Insert Rows into a SQL Server 2005 Table will the order be preserved?

查看:168
本文介绍了当我将行插入SQL Server 2005的表将顺序是preserved?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我选择使用了一系列行从SQL Server 2005表ORDER BY子句,然后将它们插入到不同的(空),SQL Server 2005的表,我可以指望住在同一顺序的行。

When I select a series of rows from a sql server 2005 table using an "order by" clause and then insert them into a different (and empty) sql server 2005 table can I count on the rows staying in the same order.

我问的原因是我想用ADO.net操纵行。我想在一个特定的顺序,以提高我使用ADO.net计算的速度行。

The reason I am asking is that I want to manipulate the rows using ADO.net. I want the rows in a specific order to improve the speed of the calculations I do using ADO.net.

感谢您的帮助。

推荐答案

关系型数据库的无序集工作。这些套没有订单,除非你是为了明确适用于他们。如果你希望在从第一选择同样的顺序在第二个表,那么你就需要申请,相当于 ORDER BY 条款。

Relational databases work on unordered sets. These sets do not have an order unless you explicitly apply an order to them. If you want the same order in the second table as when you selected from the first, then you need to apply the equivalent ORDER BY clause.

这篇关于当我将行插入SQL Server 2005的表将顺序是preserved?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆