..................问一句SQL语句的问题................(20分)

  • 主题发起人 主题发起人 JasonLaw
  • 开始时间 开始时间
J

JasonLaw

Unregistered / Unconfirmed
GUEST, unregistred user!
select top 5 distinct fName from TableName order by fID DESC

当然,上面那条是不能运行成功的。。。。。

但是我想你应该能明白我的意思。。

请问这句SQL语句要如何修改。才能达到目的呢?
 
select distinct top 5 fName from TableName order by fID DESC
 
select distinct top 5 fName.* from TableName order by fID DESC
 
sele fName distinct top 5 from TableName order by fID DESC
 
sele top 5 from (sele distinct fName from TableName) a order by fID DESC
 
select top 5 from (select distinct fName from TableName order by fID DESC)
 
select top 5 from(select distinct fName from TableName)b order by fID Desc
 
多人接受答案了。
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
1K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
900
SUNSTONE的Delphi笔记
S
I
回复
0
查看
446
import
I
后退
顶部