[英]SQL select 2 columns A and B but output A sorted by B
say I have a db with 2 columns 说我有2列的数据库
Col1 | Col2
VW | 2011
FIAT | 2015
CHEVY | 2010
...I want to output just Col1 based off the years in Col 2 in Desc order (2015,2011,2010) ......我想基于关闭多年的西2中说明顺序输出只是 Col1中(2015,2011,2010)
Final Output requested: 请求的最终输出:
FIAT
VW
CHEVY
SELECT Col1 FROM dbo.Table1 ORDER BY Col2 DESC;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.