I have a database which has gotten 100 rows and I would like to see these rows from down to up. How can I do that & what's the syntax in order to do this?
我有一个已经有100行的数据库,我希望看到这些行从下到上。我怎么能这样做?为了做到这一点,语法是什么?
1 个解决方案
#1
1
You can use the ORDER BY clause of a SELECT query to order your resultset in a particular order.
您可以使用SELECT查询的ORDER BY子句按特定顺序对结果集进行排序。
SELECT field1, field2, FROM tablename ORDER BY field1 ASC, field2 DESC
ASC will order the resultset into ascending order, DESC into descending order. You can order by multiple fields as well.
ASC将结果集按升序排序,DESC按降序排列。您也可以按多个字段订购。
#1
1
You can use the ORDER BY clause of a SELECT query to order your resultset in a particular order.
您可以使用SELECT查询的ORDER BY子句按特定顺序对结果集进行排序。
SELECT field1, field2, FROM tablename ORDER BY field1 ASC, field2 DESC
ASC will order the resultset into ascending order, DESC into descending order. You can order by multiple fields as well.
ASC将结果集按升序排序,DESC按降序排列。您也可以按多个字段订购。