I'm trying to retreive the connection_id column while inserting into Connections table. I have a table being generated at the start of the application like this with the column_id being auto generated.
CREATE TABLE connections (connection_ID INT not null primary key GENERATED ALWAYS AS IDENTITY(START WITH 1, INCREMENT BY 1),
connection_name VARCHAR(100) unique not null, user_name VARCHAR(100) not null, password VARCHAR (100) not null, server_url
VARCHAR(100) not null, port_number VARCHAR(10) not null),
I'm using the following statement to retrieve the liat of connection_ids
PreparedStatement stmt = dbconn.prepareStatement(insertString, new String[] {"connection_id"});
But I get the following exception even though my connection_id is auto-generated,
java.sql.SQLException: Table 'CONNECTIONS' does not have an auto-generated column named 'connection_id'.