I have a table that contains a column with a string containing its own ID. How can I insert a new line using a single SQL statement?
id| URL
--|----------------------
1|"http://example.com/1"
2|"http://example.com/2"
3|"http://example.com/3"
I need something like
NEXT_ID = SELECT nextval('table_name_id_seq');
insert into table_name (id, name) values (NEXT_ID, 'http://example.com/' + NEXT_ID) returning *