I have created table and provided primary key. (ADD COLUMN id SERIAL PRIMARY KEY).
In the postgres database, sometimes the sequence name is showing as table_column_seq1 and sometimes it is table_column_seq only.
Can anybody explain why this 1 is appending?
also using java program can I fetch this sequence name on this table column dynamically and change? I want to execute alter sequence script by getting its name through java program.
alter table mytable ADD COLUMN myid SERIAL PRIMARY KEY