I have never used SQL before until today. I'm trying to look at the last row of a table (the name of the table is prices_table
). The table has 3 columns, sid
, prices
, datetime
.
I read How to select the last record of a table in SQL? and tried to use the first answer:
SELECT * FROM prices_table ORDER BY ID DESC LIMIT 1;
but it gives the error:
SELECT * FROM prices_table ORDER BY ID DESC LIMIT 1;
ERROR: column "id" does not exist
LINE 1: SELECT * FROM prices_table ORDER BY ID DESC LIMIT 1;
^
HINT: Perhaps you meant to reference the column "prices_table.sid"