当前位置:网站首页>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');如何实现如下查询排序结果:

边栏推荐
- Skills of PLC recorder in quickly monitoring multiple PLC bits
- What are the methods of adding elements to arrays in JS
- Special topic of binary tree -- acwing 19 The next node of the binary tree (find the successor of the node in the tree)
- Logu p3398 hamster looks for sugar (double LCA on the tree to judge whether the two paths in the tree intersect)
- Huawei game failed to initialize init with error code 907135000
- 数字化转型挂帅复产复工,线上线下全融合重建商业逻辑
- ImportError: cannot import name ‘Digraph‘ from ‘graphviz‘
- STM32 single chip microcomputer programming learning
- 【IDEA】使用插件一键逆向生成代码
- [quick application] there are many words in the text component. How to solve the problem that the div style next to it will be stretched
猜你喜欢

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

enumrate的start属性的坑
![[in simple terms, play with FPGA learning 3 ----- basic grammar]](/img/f0/0204fa5197033877dc0758203253ae.png)
[in simple terms, play with FPGA learning 3 ----- basic grammar]

Huawei game failed to initialize init with error code 907135000

Special topic of binary tree -- acwing 1497 Traversal of the tree (use post and mid order traversal to build a binary tree)

Eight sorting summaries

Flink two Open, implement Batch Lookup join (attached source)

【深入浅出玩转FPGA学习2----设计技巧(基本语法)】

Implement custom drawer component in quick application

Mongodb learning and sorting (condition operator, $type operator, limit() method, skip() method and sort() method)
随机推荐
[play with FPGA learning 2 in simple terms ----- design skills (basic grammar)]
The first white paper on agile practice in Chinese enterprises was released | complete download is attached
III Chip startup and clock system
MTK full dump抓取
Is bond fund safe? Does the bond buying foundation lose principal?
spritejs
Implement custom drawer component in quick application
Pit of the start attribute of enumrate
Array splitting (regular thinking
ImportError: cannot import name ‘Digraph‘ from ‘graphviz‘
The difference between SQL left join main table restrictions written after on and where
Summary of data export methods in powerbi
PKG package manager usage instance in FreeBSD
Jenkins安装
Xiao Sha's pain (double pointer
tqdm的多行显示与单行显示
[paid promotion] collection of frequently asked questions, recommended list FAQ
二.Stm32f407芯片GPIO编程,寄存器操作,库函数操作和位段操作
ASTParser 解析含有emum 枚举方法的类文件的踩坑记
Openmldb meetup No.4 meeting minutes