Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8220379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:29:59+00:00 2026-06-07T13:29:59+00:00

How can I retrieve the last entered value of the column in the database

  • 0

How can I retrieve the last entered value of the column in the database (MS ACCESS 2007)

I used the following code

String sql = "SELECT Last(RegNumber) FROM Death ";

but it does not work in MS ACCESS and when I run the program Error generates as

java.sql.SQLException: Column not found

but I have created a column in database as RegNumber

I am using Java for programming in which I used this query

EDIT:

RegNumber is in String form not in integer form so I cant use DESC or ASC

Please help me

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T13:30:00+00:00Added an answer on June 7, 2026 at 1:30 pm

    Sort your table by whatever criteria you’d like and use SELECT TOP 1 * FROM myTable ORDER BY RegNumber ASC.

    Or ORDER BY incrementingId DESC

    Basically there must be some logical order to the sorting for what you refer to as the “last entered column” (which I assume means row, not column)

    EDIT: Your function is correct in Access, and should return the correct value. However Java may not interpret it correctly. Try your query in an Access native query, then try debugging your Java. If it’s simply that Java does not support this function, consider using the built in ResultSet() functions in Java.sql

    ResultSet rs = ....;
    rs.last();
    int RegNumber = rs.getRow();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to select last 50 rows from MySQL database within column named id
How can I retrieve the first and last record from a table. Note :
I can retrieve a Cookie value by: <?php $cookie=$_COOKIE[cookieName]; ?> Now i want to
I have a blob saved in my database (a text file). I can retrieve
How can I retrieve the last class in an element that has multiple classes
I use Google analytic, i want to retrieve the last 100 search string from
How can I retrieve the last record in a certain queryset?
how can i retrieve the last children of an element with XSLT for example:
I want to retrieve the last row from the data store so how can
The following code shows that I can insert uncompatible type into Map, but when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.