mysql - 找到表中仅第二位有空格的特定记录?

标签 mysql sql oracle11g oracle-sqldeveloper

我有 xyz 的记录表。有一个像这样的列

0025336625
0036625336
9986698852
0 22336652
1 32236633
9333265556
8 44555223

所以我只需要从仅以粗体显示的表中获取这些记录。

最佳答案

您可以使用 substr 来过滤列

select * 
from my_table 
where substr(my_column, 2, 1 ) = ' '; 

关于mysql - 找到表中仅第二位有空格的特定记录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39771361/

相关文章:

database - Oracle 存储过程不工作,可能是因为语法

php - Mysql - 将行转换为列

mysql - 仅当存在多个不等于 0 的值时,SQL 查询平均值才存在?

mysql - 如何删除字符串的格式部分?

mysql - 如何根据另外两个表的左连接获取表的内容

postgresql - 如何将 oracle 分层查询转换为 postgresql?

php - 如何将php购物车数据插入mysql数据库

php - 将 MS SQL 数据库与 MySQL 数据库同步

php - html特殊字符源代码

database - Oracle XE 未绑定(bind)到 IP4 端口 1521