title: How to get the column name of the primary key through jdbc
body: <p>I have the code as follows:</p>
  
  <pre><code>DatabaseMetaData dmd = connection.getMetaData();
  ResultSet rs = dmd.getPrimaryKeys(null, null, tableName);
  
  while(rs.next()){
      primaryKey = rs.getString("COLUMN_NAME");
  }
  </code></pre>
  
  <p>rs is not null while <code>rs.next()</code> always return <code>false</code>, anyone has idea about it? Thanks.</p>