SQL 查询与进阶学习指南
1. SQL 基础查询操作
1.1 字符串子串查询
若要返回字符串 “Please find the substring in this string.” 中第 17 至 25 个字符,可使用如下 SQL 语句:
mysql> SELECT SUBSTRING('Please find the substring in this string',17,9);
执行结果如下:
+------------------------------------------------------------+
| SUBSTRING('Please find the substring in this string',17,9) |
+------------------------------------------------------------+
| substring |
+------------------------------------------------------------+
1 row in set (0.00 sec)
1.2 数值函数查询
查询数字 -25.76823 的绝对值、符号(-1、0 或 1),并将该数字四舍五入到小数点后两位,SQL 语句如下:
m
超级会员免费看
订阅专栏 解锁全文
1187

被折叠的 条评论
为什么被折叠?



