I have the following table:
CREATE TABLE lawyer (
id SERIAL PRIMARY KEY,
name VARCHAR NOT NULL UNIQUE,
name_url VARCHAR check(translate(name_url, 'abcdefghijklmnopqrstuvwxyz-', '') = '') NOT NULL UNIQUE
);
I want to SELECT * FROM lawyer where name_url = "john-doe"
Character literals are put into single quotes:
SELECT *
FROM lawyer
where name_url = 'john-doe';
See the manual for details:
https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-CONSTANTS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With