Find employees whose name starts with a (case-insensitive).
Ready — edit the code above and click Run.
-- PostgreSQL schema
CREATE TABLE employees (id SERIAL PRIMARY KEY, name TEXT, dept_id INT, salary NUMERIC(10,2));
CREATE TABLE departments (id SERIAL PRIMARY KEY, name TEXT);
INSERT INTO employees (name, dept_id, salary) VALUES ('Ali',1,90000),('Sara',2,120000);
INSERT INTO departments (name) VALUES ('Engineering'),('Sales');
SELECT name FROM employees WHERE name ILIKE 'a%';
Try solving on your own first, then reveal the official answer.
ILIKE is PostgreSQL case-insensitive pattern match.