title: Columns Containing Sets Of Values tags: postgres set This is the `ARRAY` type, not a set. As SQL uses the `SET` keyword in `UPDATE`. ```sql CREATE TABLE a ( id SERIAL PRIMARY KEY, name TEXT, s TEXT[] ); INSERT INTO a ( name, s ) VALUES ( 'Hello World', '{ "hello", "world" }' ), ( 'Mr Flibble', '{ "mr", "flibble" }' ); SELECT name, s FROM a WHERE 'hello' = ANY( s ); ``` outputs ``` name | s -------------+--------------- Hello World | {hello,world} ``` This does not prevent duplicate elements in a column, e.g. `{ "hello", "hello" }` is possible.