Laur's blog
Sign in Subscribe

column

A collection of 2 posts
List Columns in a ResultSet
column

List Columns in a ResultSet

In order to list all columns in a JDBC ResultSet (e.g. for debug purposes), you need to iterate through its metadata: // Get the metadata ResultSetMetaData md = rs.getMetaData(); // For each column, list its name for (int i=0;i < md.getColumnCount(); i++) logger.debug("Column :" + i
Dec 8, 2016 1 min read
Add Primary Key Column to PostgreSQL Table
add

Add Primary Key Column to PostgreSQL Table

The other day I got a question: How to add a numeric PK column to an already existent table? A quick look on the net showed that it is indeed possible to add an auto-incrementing PK to an already existing table (if you don't have already a PK
Mar 23, 2015 1 min read
Page 1 of 1
Laur's blog © 2025
  • Sign up
Powered by Ghost