How do I sort the query results by keyword occurrence in column? I'm using SQL Server 2008 with Full-text indexing.
如何按列中的关键字出现对查询结果进行排序?我正在使用带有全文索引的SQL Server 2008。
2 个解决方案
#1
select columnname, count(columnname) as cnt from tablename group by columnname order by count(columnname) desc
选择columnname,count(columnname)作为cnt from tablename group by columnname order by count(columnname)desc
#2
select * from tablename order by columnname
按列名从表名顺序中选择*
Is that what you're looking for?
这就是你要找的东西吗?
#1
select columnname, count(columnname) as cnt from tablename group by columnname order by count(columnname) desc
选择columnname,count(columnname)作为cnt from tablename group by columnname order by count(columnname)desc
#2
select * from tablename order by columnname
按列名从表名顺序中选择*
Is that what you're looking for?
这就是你要找的东西吗?