Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 SQL 5.6、MySQL Workbench 中获取特定列的中间值,即:
5014.**160201**.1200.1-2在这里我需要价值**160201**
5014.**160201**.1200.1-2
**160201**
您可以使用以下方法根据句点分隔符获取第二个substring_index()值:
substring_index()
select substring_index(substring_index(col, '.', 2), '.', -1) as second_part