当前位置:网站首页>mysql链表数据存储查询排序问题
mysql链表数据存储查询排序问题
2022-07-02 09:34:00 【CSDN问答】
mysql数据表中的原始数据结构:

-- ------------------------------ Table structure for asort-- ----------------------------DROP TABLE IF EXISTS `asort`;CREATE TABLE `asort` ( `from` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `to` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `mark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;-- ------------------------------ Records of asort-- ----------------------------INSERT INTO `asort` VALUES ('START', 'A', '');INSERT INTO `asort` VALUES ('A', 'B', '');INSERT INTO `asort` VALUES ('A', 'F', 'FALSE');INSERT INTO `asort` VALUES ('F', 'B', 'RETURN');INSERT INTO `asort` VALUES ('B', 'C', '');INSERT INTO `asort` VALUES ('C', 'D', '');INSERT INTO `asort` VALUES ('C', 'G', 'FALSE');INSERT INTO `asort` VALUES ('G', 'D', 'RETURN');INSERT INTO `asort` VALUES ('D', 'H', 'FALSE');INSERT INTO `asort` VALUES ('H', 'D', 'RETURN');INSERT INTO `asort` VALUES ('D', 'E', '');INSERT INTO `asort` VALUES ('E', 'END', '');INSERT INTO `asort` VALUES ('E', 'I', 'FALSE');INSERT INTO `asort` VALUES ('I', 'END', 'RETURN');如何实现如下查询排序结果:

边栏推荐
- spritejs
- How does the whole network display IP ownership?
- [in simple terms, play with FPGA learning 3 ----- basic grammar]
- Flick two open, realized a batch lookup join (with source code)
- Rest (XOR) position and thinking
- From the perspective of attack surface, see the practice of zero trust scheme of Xinchuang
- How to implement tabbar title bar with list component
- Special topic of binary tree -- acwing 1497 Traversal of the tree (use post and mid order traversal to build a binary tree)
- 三.芯片啟動和時鐘系統
- Primary key policy problem
猜你喜欢

PLC-Recorder快速监控多个PLC位的技巧

Solve the problem of data blank in the quick sliding page of the uniapp list

V2X-Sim数据集(上海交大&纽约大学)

JVM garbage collector

数字化转型挂帅复产复工,线上线下全融合重建商业逻辑
![Luogu p5536 [xr-3] core city (greed + tree DP looking for the center of the tree)](/img/dc/2aa55c9b3f23c292820a56ea72fedd.png)
Luogu p5536 [xr-3] core city (greed + tree DP looking for the center of the tree)

TIPC messaging3

QT learning diary 7 - qmainwindow
![[applinking practical case] share in app pictures through applinking](/img/12/5616f1fa55387b81e25e55a98022b9.png)
[applinking practical case] share in app pictures through applinking

Special topic of binary tree -- acwing 3384 Binary tree traversal (known preorder traversal, while building a tree, while outputting middle order traversal)
随机推荐
What are the methods of adding elements to arrays in JS
Indexer in C #
Supermarket (heap overload
[quick application] win7 system cannot run and debug projects using Huawei ide
八大排序汇总
从ros1到ros2配置的一些东西
The first white paper on agile practice in Chinese enterprises was released | complete download is attached
The difference between self and static in PHP in methods
CentOS8之mysql基本用法
Creation and use of unified links in Huawei applinking
tqdm的多行显示与单行显示
【深入浅出玩转FPGA学习2----设计技巧(基本语法)】
金山云——2023届暑期实习
ROS lacks catkin_ pkg
ImportError: cannot import name ‘Digraph‘ from ‘graphviz‘
Special topic of binary tree -- acwing 1497 Traversal of the tree (use post and mid order traversal to build a binary tree)
Xiao Sha's pain (double pointer
SSRF
TIPC messaging3
Special topic of binary tree -- acwing 47 Path with a certain value in binary tree (preorder traversal)