Code example for Statement

Methods: getGeneratedKeys

0
	 
	abstract public void createTables() throws SQLException; 
	 
	protected int getInsertedId() throws SQLException 
	{ 
		ResultSet resultSet = statement.getGeneratedKeys();
		if(!resultSet.next()) return -1;
		else 
		{ 
			return resultSet.getInt(1);
		} 
	} 
}