mysql

作者: c667ec5a71d8 | 来源:发表于2019-05-31 02:06 被阅读0次

    mysql> use RUNOOB;

    Database changed

    mysql> SELECT * from runoob_tbl ORDER BY submission_date ASC;

    +-----------+---------------+---------------+-----------------+

    | runoob_id | runoob_title  | runoob_author | submission_date |

    +-----------+---------------+---------------+-----------------+

    | 3        | 学习 Java  | RUNOOB.COM    | 2015-05-01      |

    | 4        | 学习 Python | RUNOOB.COM    | 2016-03-06      |

    | 1        | 学习 PHP    | 菜鸟教程  | 2017-04-12      |

    | 2        | 学习 MySQL  | 菜鸟教程  | 2017-04-12      |

    +-----------+---------------+---------------+-----------------+

    4 rows in set (0.01 sec)

    mysql> SELECT * from runoob_tbl ORDER BY submission_date DESC;

    +-----------+---------------+---------------+-----------------+

    | runoob_id | runoob_title  | runoob_author | submission_date |

    +-----------+---------------+---------------+-----------------+

    | 1        | 学习 PHP    | 菜鸟教程  | 2017-04-12      |

    | 2        | 学习 MySQL  | 菜鸟教程  | 2017-04-12      |

    | 4        | 学习 Python | RUNOOB.COM

    相关文章

      网友评论

          本文标题:mysql

          本文链接:https://www.haomeiwen.com/subject/viditctx.html