-1

I recently came across PreparedStatement and I am a bit confused with it,Which table actually it queries the data from?

For example:

PreparedStatement state = con.prepareStatement("Select generate_id(?)");
state.setString(1, "SOME_TABLE");
ResultSet results = state.executeQuery();

So,whats the table name and whats the column name here? Can someone explain?

Thanks!

Himanshu Ranjan
  • 282
  • 1
  • 7
  • 22

1 Answers1

1

I got the solution,Its a stored procedure.I can check the function details using:

SELECT prosrc FROM pg_proc WHERE proname = 'generate_id';
Himanshu Ranjan
  • 282
  • 1
  • 7
  • 22