南康中学2016届校花:VB怎样把重新排好序的表覆盖回去?

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/20 08:52:59
我想把一个mdb表的内容按照type字段重新排序后再存回去,先是执行下面的
select distinct * into temp_data from info order by type放进一个临时表里面,然后就不知道怎么再把这个临时表的内容覆盖进原来的表里,不知道有没有什么简单的办法可以办到?
还有select distinct * from info 里面的distinct是什么意思呢?
多谢!

DISTINCT Omits records that contain duplicate data in the selected fields. To be included in the results of the query, the values for each field listed in the SELECT statement must be unique. For example, several employees listed in an Employees table may have the same last name. If two records contain Smith in the LastName field, the following SQL statement returns only one record that contains Smith:
SELECT DISTINCT
LastName
FROM Employees;

If you omit DISTINCT, this query returns both Smith records.

If the SELECT clause contains more than one field, the combination of values from all fields must be unique for a given record to be included in the results.

The output of a query that uses DISTINCT isn't updatable and doesn't reflect subsequent changes made by other users.
关于distinct只能提供ENGLISH解释原文.
至于你按照type字段重新排序写回,我认为无此必要.但有些查询后可创建新表将数据写入.