如何解决如何删除用于使用 MySql 连接字符串的行
在表 t_contents
中存储了一个数据库 MySql version 8.0.17
我有这些行
+--------------------------+----+
| Contents | ID |
+--------------------------+----+
| - Gaio Giulio Cesare | 1 |
| - Quinto Orazio Flacco | 2 |
| - Marco Porcio Catone | 3 |
| • Marco Tullio Cicero | 4 |
| • Publilio Siro | 5 |
| • Lucrezio | 6 |
+--------------------------+----+
当字符串以 -
或 •
符号开头并使用 DESC SEPARATOR "\n"
进行此返回(例如 •
符号)时,我需要连接行
使用此查询在表 group_concat rows
中插入新的 t_contents
在表group_concat rows
中插入新的t_contents
之后如何从表t_contents
中删除单行?
+--------------------------+----+
| Contents | ID |
+--------------------------+----+
| • Marco Tullio Cicero | 4 |
| • Publilio Siro | 5 |
| • Lucrezio | 6 |
+--------------------------+----+
任何帮助将不胜感激...谢谢。
PS:抱歉,如果粘贴查询代码,问题未发布...
-- ----------------------------
-- Table structure for t_contents
-- ----------------------------
DROP TABLE IF EXISTS `t_contents`;
CREATE TABLE `t_contents` (
`Contents` varchar(255) DEFAULT NULL,`sID` int(11) NOT NULL AUTO_INCREMENT,PRIMARY KEY (`sID`) USING BTREE
) ENGINE = InnoDB;
-- ----------------------------
-- Records of t_contents
-- ----------------------------
INSERT INTO `t_contents` VALUES ('- Gaio Giulio Cesare',1);
INSERT INTO `t_contents` VALUES ('- Quinto Orazio Flacco',2);
INSERT INTO `t_contents` VALUES ('- Marco Porcio Catone',3);
INSERT INTO `t_contents` VALUES ('• Marco Tullio Cicero',4);
INSERT INTO `t_contents` VALUES ('• Publilio Siro',5);
INSERT INTO `t_contents` VALUES ('• Lucrezio',6);
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。