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 :-)