1

从此表:

DECLARE @tmp TABLE (id int, ahccs int, info varchar(25), endDate date)

5   123 et  2012-09-15
2   321 et  2012-04-27
2   321 et  2012-04-27
2   321 et  2012-04-27
3   134 et  2012-04-27

我怎么能只将这些值插入另一个表

5   123 et  2012-09-15
2   321 et  2012-04-27
3   134 et  2012-04-27

谢谢!

4

1 回答 1

3

使用不同的关键字

Create table TableName AS (Select Distinct [id] as id, [ahccs] as ahccs, [info] as info, [endDate] as endDate From Table_Name)
于 2012-04-27T20:00:15.947 回答