473,387 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to display last record entered with select query ??

20
Hi,

I want to display the last recorded record in the database of SQL SERVER 2005.

How can i display it with the select query in the grid view...

The database contains the information which is general contact details:

Name
Address
Phone
Email

How can i display on the submit click event that ur record is inserted and display details in gridview .

How to write it in select query identity??
I have already an Identity Column in the Table structure.
Apr 27 '07 #1
2 6111
try this...
if they are sort by name try this syntax

Name
Address
Phone
Email

select top 1 * from TABLE order by Name Desc

hope this will help
Mar 14 '08 #2
debasisdas
8,127 Expert 4TB
Hi,

I want to display the last recorded record in the database of SQL SERVER 2005.
How can i display it with the select query in the grid view...
The database contains the information which is general contact details:
You want to display from a database or from a table ?

I hope you know the basic difference between the two.
Mar 14 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Dan Matthews | last post by:
Hey everybody, I have an 2000 Access database that stores job listings from potential employers for a school. I would like to be able to display the date on a webpage the last time the database...
15
by: Eric J. Holtman | last post by:
I feel like the answer to this should be blinding obvious. I also feel like it's probably an exercise in an undergraduate database design course. I'm off to google for an answer, but I figure I'd...
5
by: xixi | last post by:
hi, we are running db2 udb on v8.1, i am using jdbc sql, is there anyway to create a sql saying i want to get the last record of resultset? i try to open a big resultset and point the cursor to the...
5
by: robecflo | last post by:
Hi Forum, i have a problem, hope somebody can give me ideas. I'm developing with windows forms and vb.net, and oracle as a database. At this moment i have a table called amortizaciones, this table...
2
by: heri | last post by:
Can you please assist me on how to get the 2nd record in case there are 3 or more records of an employee, the query below gets the MAX and MIN BasicSalary. However, my MIN Basic Salary is wrong...
3
by: Bob Sanderson | last post by:
I am trying to create a form for a MySQL database similar to a spreadsheet. The idea is to display a list of records, with the last line of the list being an input form. When the user enters data...
6
by: Christo | last post by:
I have this script for showing news on a page, but i want it to only show the last 10 records, as in the 10 records that were added to the database last. the script shows the entries in descending...
36
by: beebelbrox | last post by:
Hi, I am new VB programming in Access and I am requesting help with the following code. WIndows OS MSaccess 2003 This code is attached to an unbound form that will display a specific recordset...
3
by: jclover | last post by:
When creating a query in Access (assumption is the data has a unique ID which is numerical...new records, autonumber) how reliable is the "Last of" grouping function vs the "Max of" the ID, and then...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.