Hi,
I am using mysql as database and I am stuck at one point. I am not able to create proper sql query. Scenario is,
Suppose I have a table having firstname ,lastname and salary. I want to select all rows whose firstname starts from 'A' but not the record with lastname 'Ronchi'.
I have tried this query: SELECT * from tablename WHERE firstname REGEXP '^A' AND (firstname <> 'A' AND lastname <> "ronchi');
But it is giving unexpected result as it is negating the the '^A' result and giving me zero rows.