I have a basic tables of books like so:
CREATE TABLE books (
id integer primary key,
name text not null
);
INSERT INTO books (id, name) VALUES (1, 'The Ghost');
I want to search for a book name which matches the search term ^The Ghost$
. As you can see there is some regular expression in the term. How do I match via the regular expression?
I tried doing this but I got no results
select *
from books
WHERE name like '%^The Ghost$%'
SQL fiddle: http://sqlfiddle.com/#!17/8a5aa6/1