I am very new at PostgreSQL and want to be able to delete rows from a table if a specific column starts with a certain pattern.
For example,
I have a reference
column which is a sort of time stamp (YYMMDDHHMM). If the reference column starts with 16********, then i'd like it to be deleted.
So far, I know how to delete the column if the whole reference is known. E.g:
DELETE FROM my_tbl WHERE name='test1' AND ref_no=1601010000;
However, I need to change this so that the condition only specifies the first 2 digits of the reference number.