Although there are answers to this on internet but somehow not working for me.
I want to manually change next value for my sequence. In pgAdmin, I can see the sequence Substances_SUBID_seq in the list under Sequences but following query is not working in Query Tool of pgAdmin
select setval('Substances_SUBID_seq', (select max("SUBID") from "Substances"));
The error I get is:
ERROR: relation "substances_subid_seq" does not exist
LINE 1: select setval('Substances_SUBID_seq', (select max("SUBID") f...
What am I doing wrong?