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.
我有一张员工表。我想找到最后一个字母为“H”的员工姓名的第三个字母。查询会是什么?请帮帮我。顺便说一句,我使用的是oracle 10g。
您需要使用该SUBSTR功能
SUBSTR
SELECT substr( employee_name, 3, 1 ) third_letter FROM employee WHERE substr( employee_name, -1 ) = 'H'
SELECT substr(employee_name, 3, 1 ) as third_letter FROM employee WHERE employee_name LIKE '%H'