I want to the answer of article titel.

Show your table structure. What have you tried so far?

Presuming your table is currently in ascendning mode from an id (the primary, auto incrementing key), you can query your table to order the id to descending mode, and then limit the result set to just one tuple/row:

SELECT * FROM table_name ORDER BY id DESC LIMIT 1;
  1. SELECT top 1 FROM table_name ORDER BY id DESC LIMIT 1;

Does mysql supprt top 1 clause?

Does mysql supprt top 1 clause?

No. The LIMIT 1 does that.

Now I know because in vb.net, I am using the top 1 which I thougth it can be used in this problem.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.