I want to find all the employees whose names have exactly two n's in their name. How can this be done?


something like this should be enough:

select * from employee_table where Length(lastname) - length(replace(lastname, 'n','')) = 2

be aware that may cause a full table scan :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.