0

I have been querying for the most recent (auto incrementing) ID of a given table I've inserted into (SELECT "id" FROM "my_table" ORDER BY "id" DESC LIMIT 1), but I'm wondering if there exists a more general way to do this, instead.

Luxart
  • 17
  • 2

1 Answers1

0

Get Column

SELECT max ("id") FROM "my_table"

Get Row

Select * from "my table" where "id" in (SELECT max ("id") FROM "my_table")
Alper Şaldırak
  • 1,034
  • 8
  • 10