我想用 SQL 查询返回的单词打印标签,例如 follow。
1 2 3
4 5 6
当我想打印这些标签的背面时,我必须按如下方式打印它们
3 2 1
6 5 4
在我的真实案例中,我有 5 列乘 2 行,我如何制定我的查询,以便我的记录像第二个一样排序。正常的排序是通过单词处理的,所以我的查询就像
SELECT * FROM Products ORDER BY Products.id
我正在使用 MS 访问 =(
编辑:
只是为了说清楚
我希望我的记录被订购,例如
3 2 1 6 5 4 9 8 7 12 11 10
编辑2 :
我的表格看起来像这样
ID ProductName
1 Product1
2 Product2
3 Product3
n Product[n]
我希望如上所述返回 ID
SELECT * FROM Products ORDER BY Products.id desc
或者,如果您现在的查询确实为您提供了以下内容:
select col1, col2, col3 from products order by products.id;
为什么不使用
select col3, col2, col1 from products order by products.id;